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
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
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
Sure,
Just take a look at the official documentation from Googles Developers centre, it should get you started and then you can experiment with more features.
Good luck!
Thank you
but any more pointers are appreciated
Bump
Bump
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!
@ranam, do not bump threads, it is against the rules.
Here are a couple of examples, these may help:
http://robertnyman.com/html5/geolocation/current-location-and-directions.html
http://msdn.microsoft.com/en-us/magazine/hh563893.aspx
http://jmperezperez.com/2010/07/google-maps-geolocation-directions-specific-destination/
If you want more solutions, i'd recommend you google or search this forum deeply...
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.