开发者

Google Maps Javascript v3 question, how do you pass the location through URL instead of form input

开发者 https://www.devze.com 2023-03-05 19:23 出处:网络
I would like to开发者_StackOverflow社区 use the google\'s geocoding like this: http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.html

I would like to开发者_StackOverflow社区 use the google's geocoding like this:

http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.html

But is it possible to pass the location through the browser rather than the form input. http://www.mydomain/myiphonemap.html?somevariable=210+Main+Street+Some+City+Some+NJ+08260

How would the javascript need to change to accomplish this?


I'm not sure how js would need to be changed as I don't know what is it right now, but you indeed can pass address through URL, like so: http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=500+4th+St,+San+Francisco,+CA+94107&ie=UTF8&t=h&z=16

There are many variables that can be added or removed to/from URL - language, zoom, and so on and so forth.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号