开发者

Place markers through search in Google maps API (static)

I am currently working with the Google Maps API and returning static maps (images) from the API.

I need to place markers on the map. The documentation says how to place markers on the map by开发者_开发百科 defining long/lat values: http://code.google.com/apis/maps/documentation/staticmaps/#Markers

My problem is that i don´t know where to place the markers. I want a google maps search phrase to determine the placement of the markers. Is that possible?

To sum up:

I want to submit a search phrase to the API and have a static map (image) returned with markers matching my search phrase.


You can place markers based on an address:

http://maps.google.com/maps/api/staticmap?center=55.665149742004,12.5627200816055&zoom=12&size=640x640&sensor=false&maptype=hybrid&markers=color:blue|label:S|smallegade%201,%20frederiksberg


Yes, it's possible. Try this: http://code.google.com/intl/pl/apis/maps/documentation/geocoding/

This particular link regards to Maps API Web Services, but there are others api, for javascript for instance. Generaly you need Geocoging that tranlate address to latitude and longitude


I believe you can not search a term in Maps Static version. It is not in the accepted parameters: https://developers.google.com/maps/documentation/maps-static/dev-guide#Usage

Try using Embed or JavaScript versions instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜