I know how to mark locations on google map using Google Maps API v3. How to do the same if I have a php/javascript array of ip addresses, not lat and lng coordinates?
Asked
Active
Viewed 1,568 times
3 Answers
1
You'll need some way to convert them from IP addresses to co-ordinates - to which there is a post on StackOverflow asking this very question.
My favourite is IPInfoDB which offers the service for free and can return you the information you require using a very simple GET request:
http://api.ipinfodb.com/v3/ip-country/?key=<your_api_key>&ip=74.125.45.100
If you replace ip-country
with ip-city
then you get city level precision.
0
You need a ip-geolocation service that can convert the IP address into approximate geographical coordinates. See something like http://ip2location.com/ which I believe offers a paid API service. I don't know if there is any unlimited free service to do the same.

leftclickben
- 4,564
- 23
- 24
0
I like http://www.iptolatlng.com/ because it gives me staight JSON and it gives me the results I want in the easiest fashion.

mikewhit
- 121
- 5