|Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/19/10 1:20 AM|
I have created in Google Maps (on a separate network running an enterprise edition of google maps) a KML file that has html form input buttons on various placemarks that, when clicked, execute javscript code to draw a circle around the selected placemark.
I wish to have the same functionality available when people download the same KML file that is used on google maps, is it possible?
|Re: Dynamically create circles of set distance from a placemark?||barryhunter||7/19/10 3:26 AM|
As far as I know there is not 'enterprise' version of Google Maps itself, only the Google Maps API. That doesnt provide a fully working website, its implemented by you (or your developers)
Because we persumably cant access your map, we cant really tell you how to do that.
|Re: Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/19/10 6:22 AM|
No, it works just fine in the version of google maps running on the separate network, that's not the problem.
I want to have, within the info balloon for a placemark in Google Earth, a button or link that will place a range ring/circle around it.
|Re: Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/19/10 6:29 AM|
I don't want to export the circles, as there are several hundred placemarks, each with buttons to turn on/off range rings.
|Re: Dynamically create circles of set distance from a placemark?||barryhunter||7/19/10 6:57 AM|
Ah, ok dont think its really possible to do the same in Google Earth desktop.
You would need to create circles in the KML file, but http://www.sgrillo.net/googleearth/gepath.htm might help if dont want to do it yourself.
|Re: Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/21/10 12:45 AM|
Just had an idea with this, might be a little out-of-the-box.
Could I put a hyperlink in the info balloon, which sends the size and center point of the circle to a webpage that reads those parameters and outputs a KML file which google earth loads? Would be like:
Which would just return with document.write a complete .kml file.
Worth a shot anyway.
|Re: Dynamically create circles of set distance from a placemark?||barryhunter||7/21/10 2:28 AM|
Can try it, a script here you can use:
|Re: Dynamically create circles of set distance from a placemark?||barryhunter||7/21/10 2:31 AM|
... or at least it did. Just tried it with 5.2 - it actully worked quite smooth.
Previous versions would goto the standalone browser, which would then prompt what to do with file, then you have click to load it in GE.
|Re: Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/22/10 12:08 AM|
Tried loading a KML with a link, works in 4.2 as well. Now I just need to get the source to that nearby.org.uk site.
|Re: Dynamically create circles of set distance from a placemark?||barryhunter||7/22/10 3:04 AM|
|Re: Dynamically create circles of set distance from a placemark?||Wrathernaut B. Hear||7/28/10 4:40 AM|
Well, I more or less got it working, but I must have something wrong with the headers. If I load a static KML file from my webpage with the link, it works great, if I load somebody else's dynamic page (trying to find out what headers they're using) it also works, but loading my own dynamic page causes GE to open up my web browser with the save/open dialog.
If I put these same dynamic KML links as network links, they work fine in GE, but cause google maps to fail with the same KML.