javascript - Import local (on disk) KML file with Googlemaps js in web app -
i developing web application google maps js. googlemaps api allows import kml files server.
var kmllayer = new google.maps.kmllayer({ url: url_kml_finale, map: map }); google.maps.event.addlistener(kmllayer, 'status_changed', function() {...}...
i import kml file hard drive. possible? did not find function in api parse kml file.
thanks in advance.
this not possible. google.maps.kmllayer
elements rendered server-side on google's infrastructure need accessible internet.
one workaround - try load kml regular xml file , locally parse , draw markers, polylines, , polygons yourself. depending on complexity of kml file, bit of work.
if can convert data geojson (maybe using togeojson) use google.maps.data
add map.
Comments
Post a Comment