Hi I am building a website in which the contact us page should fetch the user current location and use his location and find the directions between his location and my business location.

Is it possible? If so any pointers are appreciated

5 Years
Discussion Span
Last Post by <M/>

Yep, it is called Geolocation.

I don't know if Google Maps offers a direct API to be able to use Geolocation however I suggest you look into HTML5's geolocation feature and then overlay it on Google Maps/Bing Maps/Openstreet Map.

Just a word of caution, if it is to find a shipping destination then do NOT trust it, it is a rough calculation, and can be many miles off. It is calculated on different things depending on the device, sometimes it can be a GPS satellite if in the case of a modern smart phone, but if it is from a standard desktop then it shall most likely be Access Point location (which the chances are shall be picked up from your network provider).


can you please help me with the overlay part i mean do you have any links for that part as i have idea about the geolocation detection


You should have enough information to make a start, if you need any help or you get stuck on a specific bit then by all means return with a question however until then good luck!


If you want more solutions, i'd recommend you google or search this forum deeply...

Edited by <M/>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.