Topic: LoadGeoJSONPolygon
Hello MVD!
In the current version of MVD, we do not have a method or properties to load GeoJSON FIle. We have only LoadGPSRoute. please help on how to upload a polygon file...
Thanks!
My Visual Database → General → LoadGeoJSONPolygon
Hello MVD!
In the current version of MVD, we do not have a method or properties to load GeoJSON FIle. We have only LoadGPSRoute. please help on how to upload a polygon file...
Thanks!
Hello.
Please download latest beta version
https://www.dropbox.com/s/to42wv53pdc0g … a.zip?dl=0
function LoadGeoJSONPolyline(AFilename: string; AColor: TColor = clBlue; Opacity: integer = 255; AWidth: integer = 2; Zoom: boolean = true; HoverColor: TColor = clBlue): string
function LoadGeoJSONPolygon(AFilename: string; BorderColor: TColor = clBlue; Opacity: integer = 255; BackgroundColor: TColor = clBlue; BackgroundOpacity: integer = 100; AWidth: integer = 2; Zoom: boolean = true;'+' HoverBorderColor: TColor = clBlue; HoverBackgroundColor: TColor = clBlue): string
Examples:
Form1.Map1.LoadGeoJSONPolyline('D:\polylines.geojson');
Polyline file
{
"type":"FeatureCollection","features":[
{
"type":"Feature",
"properties": {
"name": "Polyline1"
},
"geometry":{
"type": "LineString",
"coordinates": [[
[-105.431410315776, 20.878495854271],
[-105.445432904506, 20.8727217105441],
[-105.451183560633, 20.8762102822492]
]]
}
},
{
"type":"Feature",
"properties": {
"name":"Polyline2"
},
"geometry":{
"type": "LineString",
"coordinates": [[
[-105.491410315776, 20.878495854271],
[-105.495432904506, 20.8727217105441],
[-105.491183560633, 20.8762102822492]
]]
}
}
]
}
Form1.Map1.LoadGeoJSONPolygon('D:\polygons.geojson');
Polygon file
{
"type":"FeatureCollection","features":[
{
"type":"Feature",
"properties": {
"name":"Polygon1"
},
"geometry":{
"type":"Polygon",
"coordinates": [[
[-105.431410315776, 20.878495854271],
[-105.445432904506, 20.8727217105441],
[-105.451183560633, 20.8762102822492]
]]
}
},
{
"type":"Feature",
"properties": {
"name":"Polygon2"
},
"geometry":{
"type":"Polygon",
"coordinates": [[
[-105.491410315776, 20.878495854271],
[-105.495432904506, 20.8727217105441],
[-105.491183560633, 20.8762102822492]
]]
}
}
]
}
WOW.... THANKS DRIVESOFT.. PERFECT
************************
Is there also a way to load KML file? please... Thanks4x
Download latest beta version again
https://www.dropbox.com/s/to42wv53pdc0g … a.zip?dl=0
Example
Form1.Map1.AddMapKMLLayer('https://developers.google.com/kml/documentation/KML_Samples.kml', true);
Form1.Map1.DeleteAllMapKMLLayer;
But using local files isn't supported. This is actually a limitation from the Google Maps API.
KML uses a tag-based structure with nested elements and attributes and is based on the XML standard.
More info: https://developers.google.com/kml/documentation/kml_tut
So you can use OLE MSXML2.DOMDocument to open XML files and parse them.
OK DRIVESOFT!
You are so kind!
Thanks4x!
My Visual Database → General → LoadGeoJSONPolygon
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi