Using KML NetworkLink tags in Cartograph Maps for online overlays
Cartograph Maps supports KML ovlerays containing tracks, waypoints, and shapes (polygons). Usually all data is contained in a static KML or KMZ file which is saved locally on the device.
But imagine a scenario where you want to dynamically pull information from a remote server and show it on the map, for instance, for showing the driver’s positions in fleet management or the participant’s positions during a sport event.
KML offers NetworkLink tags for pulling data from remote servers (click here for a Google article with more details about the usage of NetworkLink tags). In the following Sections we will discuss how to use KML NetworkLink tags in Cartograph Maps.
1. Create the KML file
First, we create a KML file which contains the NetworkLink tag which points to your server.
<?xml version='1.0' ?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Example KML file</name> <NetworkLink> <name>Fleet management server</name> <Link> <href>https://fleetdata.myserver.com</href> <viewFormat>south=[bboxSouth]&west=[bboxWest]&north=[bboxNorth]&east=[bboxEast]</viewFormat> <viewRefreshMode>onStop</viewRefreshMode> </Link> </NetworkLink> </Document> </kml>
2. Add the KML file to Cartograph Maps
Go to the Overlay manager – “Overlays” – “+” – “Import KML/KMZ overlay” and select the KML file created above. Cartograph Maps will now load the live data from your server and show it on the map.