Espen Arnoy
Espen Arnoy

Reputation: 157

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.

Upvotes: 2

Views: 1264

Answers (3)

Fabián Contreras
Fabián Contreras

Reputation: 43

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.

Upvotes: 0

meeron
meeron

Reputation: 76

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

Upvotes: 0

Related Questions