California - Bay Area S2000 Owners California Bay Area S2000 Owners Group

Alpine Speed Stars Touge Map

Old 02-01-2013, 12:12 PM
  #31  

 
TougeHorseman's Avatar
 
Join Date: Jul 2009
Location: Professor Touge Emeritus
Posts: 8,570
Likes: 0
Received 9 Likes on 8 Posts
Default

What do KMlL and API stand for?
Old 02-01-2013, 12:16 PM
  #32  

 
danvuquoc's Avatar
 
Join Date: Jul 2007
Location: Bay Area, CA
Posts: 3,282
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by eklipz98
What do KMlL and API stand for?
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.
Old 02-01-2013, 12:27 PM
  #33  

Thread Starter
 
andrewhake's Avatar
 
Join Date: Jan 2011
Location: Mt. ________
Posts: 5,649
Received 96 Likes on 71 Posts
Default

Originally Posted by danvuquoc
Originally Posted by eklipz98' timestamp='1359753171' post='22308662
What do KMlL and API stand for?
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.
Yep exactly. The benefit of using Google's "My Maps" tools is the draw path on roads feature. Makes it very easy to draw out new routes. I think instead of messing with elevation data I am just going to start adding video links into the road descriptions of uphill and downhill runs. The elevation data is cool but really most roads overall are a pretty standard slope up, it is only when you start focusing on individual sections that the elevation data is interesting, like the jump on Page Mill, but even then a video provides way more useful information that an elevation map ever will.

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.
Old 02-01-2013, 12:29 PM
  #34  

 
TougeHorseman's Avatar
 
Join Date: Jul 2009
Location: Professor Touge Emeritus
Posts: 8,570
Likes: 0
Received 9 Likes on 8 Posts
Default

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.
Old 02-01-2013, 12:31 PM
  #35  

Thread Starter
 
andrewhake's Avatar
 
Join Date: Jan 2011
Location: Mt. ________
Posts: 5,649
Received 96 Likes on 71 Posts
Default

Cyclists come out during the day. The animals come out at night...
Old 02-01-2013, 12:33 PM
  #36  

 
danvuquoc's Avatar
 
Join Date: Jul 2007
Location: Bay Area, CA
Posts: 3,282
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by andrewhake
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!
The javascript example Casey showed is simpler because it asked the directions api for a json route between two points, and the json route would contain the latitude/longitude of the route as accessible data, the elevation api is then queried for every plot point in that result set and displayed in graph.

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.
Old 02-01-2013, 12:42 PM
  #37  

 
danvuquoc's Avatar
 
Join Date: Jul 2007
Location: Bay Area, CA
Posts: 3,282
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by andrewhake
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.
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.
Old 02-01-2013, 12:45 PM
  #38  

Thread Starter
 
andrewhake's Avatar
 
Join Date: Jan 2011
Location: Mt. ________
Posts: 5,649
Received 96 Likes on 71 Posts
Default

Originally Posted by danvuquoc
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!
The javascript example Casey showed is simpler because it asked the directions api for a json route between two points, and the json route would contain the latitude/longitude of the route as accessible data, the elevation api is then queried for every plot point in that result set and displayed in graph.

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.
Thanks, greatly appreciated! While I fully understand the 3 options, how to actually implement them is a different story so I will probably not worry about it now. The time I spend digging around for info and working out the kinks I could just be spending driving and making videos of these routes anyway, there are so many subtleties of a road that even a great video can't provide, but definitely the best way to learn about a road before driving it.

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.
Old 02-01-2013, 12:51 PM
  #39  

Thread Starter
 
andrewhake's Avatar
 
Join Date: Jan 2011
Location: Mt. ________
Posts: 5,649
Received 96 Likes on 71 Posts
Default

Originally Posted by danvuquoc
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.
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.
Thanks, I could have different KMLs for every route I suppose but being able to view them all at once while editing or it becomes pretty easy to add duplicate routes. There is a fairly long delay in making an edit from within Google's MyMaps system and it actually updating on my own. Do you know of any better tools for creating the paths? Anything else that can automatically draw paths along roads?
Old 03-03-2013, 02:53 PM
  #40  

 
tailandd's Avatar
 
Join Date: Jan 2010
Posts: 34
Received 2 Likes on 2 Posts
Default

i just moved down here a few months ago and i checked out some of the places you recommended near my area , your maps have been really helpful for me,. keep up the good work

Quick Reply: Alpine Speed Stars Touge Map



All times are GMT -8. The time now is 06:06 PM.