Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all
How to Get GPS location from the web browser

Thanks in advance
Dreen
Posted
Updated 6-Mar-13 18:27pm
v3
Comments
ZurdoDev 6-Mar-13 7:05am    
Here's a fast reply. Can you be more specific and tell us exactly where you are stuck?
dreen_pulu 6-Mar-13 7:12am    
thanks for suggestion
[no name] 6-Mar-13 7:22am    
Thank you for sharing. Please improve your question with what you have tried to do and what specifically is not working.

1 solution

That task isn't really all that hard:

You'll need a small application on your mobile phone that:

  1. Uses the phone inbuilt/external GPS device to discover the phones longitudinal and latitudinal coordinates (elevation is usually also included).
  2. Send the information discovered in step one to your server along with a UTC timestamp and the phone's ID (a simple WebHttpRequest will probably do). You should also include an option to let the user choose either the time interval between two GPS measurements or a certain travelled distance threshold.


You'll also need an application on your server that:

  1. Receives timestamp, long/lat coordinates plus elevation and the phone ID and stores these in a SQL database.
  2. Query the database for coordinates of a certain phone ID within a certain timespan
  3. Generate HTML page utilizing Google Maps JavaScript API v3[^] to plot the points onto the map.


When returning the coordinate data (JSON format maybe) you should take the zoom level of the map into account to make sure not to return to many points that way to close to each other to be discernible.

Regards,

— Manfred
 
Share this answer
 
v2
Comments
Sandeep Mewara 6-Mar-13 11:33am    
My 5!
BillW33 6-Mar-13 11:42am    
Good explanation of what needs to be done; +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900