View Full Version : Need advise on Google API

25 Oct 2010, 7:26 PM

I am working on a project that includes the integration of a google api. The application is supposed to pinpoint the location of a user using the google api. Currently I am looking at the guide sample application and found that the latitude and longitude have to be supplied first to get the information of a particular location. In my application, the latitude and longitude of a user's location have to be automatically supplied in order to determine the location of the user. I would like to know how to detect the location of a user automatically.

So please give me some advise and guide me in the right direction with regard to the application.

Many Thanks

26 Oct 2010, 1:02 AM
You can use the Ext.util.GeoLocation class to get the current latitude and longitude of the user's device. There's an example of it's usage in the API documentation:


26 Oct 2010, 2:40 PM
thank you a lot . I am looking at it and i ll get back to you if a problem arises!

26 Oct 2010, 2:55 PM

I am just wondering the difference between Ext.Map found in the "guide" example and Ext.util.GeoLocation? Do they provide the same latitude and longitude information of a device?


26 Oct 2010, 3:12 PM
They are different things, from the docs:


Wraps a Google Map in an Ext.Component.


Provides a cross browser class for retrieving location information.

Based on the Geolocation API Specification.
If the browser does not implement that specification (Internet Explorer 6-8), it can fallback on Google Gears as long as the browser has it installed, and the following javascript file from google is included on the page...

26 Oct 2010, 3:26 PM
thank you very much.