I want to create a google maps app with kml, and i want to create the kml file dynamically depending on the zoom of the user.
Something like google earth but in google maps (the zooming part)
I tried to use the markermanager and clusterer but i have too many markers and performance on mobile devices is very bad but with kml that is not an issue but i have all marker displayed at once.
I tried to use NetworkLink in the kml file but i dont get any parameters like zoom or bounds (i am using php)
I know it could be done with JavaScript
new google.maps.KmlLayer('mykmlgenerator.php?zoom='+zoom);
but i would like to avoid that is there any way?
thank you
Firstly, let me be clear that OpenLayers are better than Google Maps if you want to use dynamic KML. Next, I want to give some simple JavaScript that we will use in OpenLayers. You should try them since it also using JavaScript library.
Here I briefly show you how the codes are written.
As you can see, there is a small orange dot on the map. That is the KML file loaded on Google Maps. And If you want to refresh them, check this link
Last but not least, I hope my answer isn’t too late for you.