Skip to content
Advertisement

Tag: google-maps

Google maps Places API V3 autocomplete – select first option on enter

I have successfuly implemented Google Maps Places V3 autocomplete feature on my input box as per http://web.archive.org/web/20120225114154/http://code.google.com:80/intl/sk-SK/apis/maps/documentation/javascript/places.html. It works nicely, however I would love to know how can I make it select the first option from the suggestions when a user presses enter. I guess I would need some JS magic, but I am very much new to JS and

How can I get city name from a latitude and longitude point?

Is there a way to get a city name from a latitude and longitude point using the google maps api for javascript? If so could I please see an example? Answer This is called Reverse Geocoding Documentation from Google: http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding. Sample Call to Google’s geocode Web Service: http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true&key=YOUR_KEY

Load google maps v3 dynamically with ajax

When i try to load google maps v3 with ajax the result is: in the source code, i suppose that writes with javascript document.write(); how i can do this without iframe? thanks. Answer This is not supported. Please load the API using supported methods: http://code.google.com/apis/maps/documentation/javascript/tutorial.html#Loading_the_Maps_API

How to call public method from a event handler

I have the function below. Everything works fine except for the Push, Pop and Remove method. These method should be called by the event-handler. This event is fired by the Google Maps API. The problem is that when the event is fired, these method are not found. I have a “Push is not defined” error message. I tried with this

Advertisement