Reputation: 2864
my problem is i want to show my registered site user on to google map but dont know how to locate the user, means i dont know the latitude and longitude of every user . I am a newbie in google map so plz help
Thanks a ton
Upvotes: 0
Views: 1069
Reputation: 344311
If you are collecting the address of each registered user, you can get the latitude and longitude on the server-side through the Google Maps HTTP Geocoding Service.
You would use the following HTTP request:
http://maps.google.com/maps/geo?q=Oxford+Street,+London&output=csv&sensor=false
Simply change the q parameter with your user's address.
Upvotes: 1
Reputation: 6322
there are two possible ways of doing this.
Upvotes: 3
Reputation: 5954
There is no way to reliably locate a user using their IP address. However if you are developing for a mobile device it may be possible to acquire their GPS coordinates. Or you could require them to enter an address and place a point on the map from that address with geocoding.
Upvotes: 1
Reputation: 587
What location data do you have for your users? Cities, states, countries?
You might want to have a look at Google's Geocoding APIs.
Upvotes: 4