How to add a postcode search box to my google map that will only search for my markers

I created a map using Google Maps API v3.

I created a Fusion table with one hundred locations (markers) or so, and I did it well in my map.

Now I need to add a search box to this page that will allow the user to enter their zip code and zoom in on the map to that area, and then only see locations in that zip code or the closest locations to that zip code. I would also like the location data to be inserted into the sidebar as seen from the now deprecated Local Search API.

I read most (if not all) of the posts that seemed to be about this, but no luck. I feel like it shouldn't be that hard, I mean what is Google really looking for in the first place? However, adding a search bar to my custom map is such a difficult task.

Any help would be appreciated, I have a deadline tomorrow. Thanks everyone, I love it.

Ryan

+3


source to share


1 answer


You will need to geocode the zip code and use the results to center the map, then show markers that match the map boundaries if they are not already shown.

See http://code.google.com/apis/maps/documentation/javascript/geocoding.html



There is an example with a search field.

+4


source







All Articles