Alpine Speed Stars Touge Map
#32
KML is the standard XML markup (think like HTML code, but formatted in a way that is standardized for creating "stuff" on a map) that is generated by his MyMap, he takes the output from that and uses the Google Maps API (application programming interface) -- which allows you to use another company's resources on your systems. His google maps that loads from the API just "loads" the KML and displays it. I do quite a bit of work in it.
#33
Thread Starter
Originally Posted by eklipz98' timestamp='1359753171' post='22308662
What do KMlL and API stand for?
Hey dan I am looking to automatically zoom the zoom the map to a route when the user clicks on a KML item and the info window pops up, any examples you know of? I have been digging around in the documentation but it never hurts to ask.
#34
Join Date: Jul 2009
Location: Professor Touge Emeritus
Posts: 8,570
Likes: 0
Received 9 Likes
on
8 Posts
Lol. I'm sure Dan would be entirely supportive if the map project includes filming airborne cars on popular bicycle routes.
I'm just joking. This project is a work of art dude and thank you for putting it together for the common good.
I'm just joking. This project is a work of art dude and thank you for putting it together for the common good.
#36
I have been looking for a way to use the start and end points of the KML routes to generate the elevation data but I am no programmer, so might take some time. Honestly elevation data would be cool, but the amount of effort required may not be worth the result.
Definitely open to any help or suggestions!
Definitely open to any help or suggestions!
Just looked up the API documentation, unfortunately, the way that you are loading the KML as a Layer object, and applying it to the map, you wouldn't be able to access the actual data points in each of the routes.
You'd have three options:
a.) Parse the KML file yourself and manually create the routes using javascript, you might however run into cross-domain ajax security issues with this method, since you are asking for the KML from someone else. You may have to proxy it in if MyMaps has no JSONP support.
b.) Reparse the KML file server-side and make Elevation API calls yourself to rewrite the KML and output it onto your map. This would involve looking at each "route" and grabbing the first and last item, and viewing an elevation difference, 2 api calls per route.
c.) Creating your own database of routes and not relying on Google MyMaps to generate the KML, probably well above your skill set at the current moment.
#37
The best you could do is add an event listener to the marker object type, and center the window and infowindow and set it to a preset zoom level. Again, you don't have access to the data points that belong to the route that the marker is clicked on, so you can't just use the getbounds and set zoom based on it, like you normally would.
#38
Thread Starter
Originally Posted by andrewhake' timestamp='1359741700' post='22308175
I have been looking for a way to use the start and end points of the KML routes to generate the elevation data but I am no programmer, so might take some time. Honestly elevation data would be cool, but the amount of effort required may not be worth the result.
Definitely open to any help or suggestions!
Definitely open to any help or suggestions!
Just looked up the API documentation, unfortunately, the way that you are loading the KML as a Layer object, and applying it to the map, you wouldn't be able to access the actual data points in each of the routes.
You'd have three options:
a.) Parse the KML file yourself and manually create the routes using javascript, you might however run into cross-domain ajax security issues with this method, since you are asking for the KML from someone else. You may have to proxy it in if MyMaps has no JSONP support.
b.) Reparse the KML file server-side and make Elevation API calls yourself to rewrite the KML and output it onto your map. This would involve looking at each "route" and grabbing the first and last item, and viewing an elevation difference, 2 api calls per route.
c.) Creating your own database of routes and not relying on Google MyMaps to generate the KML, probably well above your skill set at the current moment.
Maybe for all the popular routes I will sit down and take some time to do a nice overlay map (Gran Turismo style) that matched up to each route, just animating it myself since I already have a good system for that (using After Effects). It might be possible to get GPS data from runs that match up to the video, but again I think the time spent sorting all that out I could have already animated all the routes we have video for by hand.
Thanks for the info though, sometimes it helps to just discuss to figure out what is the better option.
#39
Thread Starter
Originally Posted by andrewhake' timestamp='1359754035' post='22308707
Hey dan I am looking to automatically zoom the zoom the map to a route when the user clicks on a KML item and the info window pops up, any examples you know of? I have been digging around in the documentation but it never hurts to ask.