简体   繁体   中英

Add get directions link to InfoWindow Google maps V3

Back with another google maps V3 question. Here's the background; I now have a map populated by a number of markers with info windows and what I want to do is add a link in the info Window that when pressed opens another browser window with google maps directions info in it. I'v read a number of tutorials including the one by Mike Williams but most of them are either written for V2 of the API or just plain don't seem to work, so do any of you good people know of a good noob tutorial that can give me some idea how to do this?

Thanks in advance

If you're just trying to send folks to http://maps.google.com for a directions query, a URL like http://maps.google.com/maps?saddr=Start&daddr=end might work, but I don't think there's any official documentation on those URLs.

If you want to have directions as part of your application, you should probably take a look at some examples of the Direction Service in the JS API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM