views:

321

answers:

2

Hi. I am working now on little project.

In one view i am returning data for google maps API (longitudes and latitudes).

Under the map I have to implement few buttons to add point of interests on the map in this location which is actually showed.

There could be some buttons/types of POI like schools, banks, atms etc.

So, let's go back. When I put all my markers on map how to add there points of interests?

I would like to get below data for them:

  1. longitude (needed for show)
  2. latitude
  3. type
  4. title
  5. description

I know, that there is google local ajax search api, but I am not sure if it is correct way to do.

I know how to find this data using google maps interface, for example:

Example Map

http://maps.google.pl/maps?f=q&source=s_q&hl=pl&geocode=&q=category:%22Banks+%26+Financial+Institutions%22&sll=51.510202,-0.12144&sspn=0.01859,0.05549&ie=UTF8&cd=1&ei=N4hUS7ynEc7AjAeWtNm4CA&radius=1.19&rq=1&ev=zi&hq=category:%22Banks+%26+Financial+Institutions%22&hnear=&z=15

but how to do this using API?

Thanks.

A: 

The Google API is a Javascript API.

If I understand you correctly, you want to add markers on a Google Map using the Google Maps API.

The documentation suggests that either you hardcode your Markers or create one by creating a Marker Manager.

I have never used Google Maps API but if you want more info, visit the documentation here.

Good luck!

The Elite Gentleman
I know how to put markers etc.I want how to find needed data for POI.
bluszcz
Well, sorry for misunderstanding your question: You've mentioned one way of doing it (Ajax Local Search API), there's another way by doing Reverse Geocoding. I've found out from here (http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/e799e4ad916a8e90) with example here (http://code.google.com/apis/maps/documentation/v3/examples/geocoding-reverse.html).I don't know if that helps....Sorry!
The Elite Gentleman
+1  A: 

The Google Local Search API can be used to obtain a small number of such points at a time, as in this example. Or you could just add the Googlebar to your Maps AVI v2 map.

Access to large numbers of such points at once is not available from Google, and is generally not available for free.

Mike Williams