geoip2 icon indicating copy to clipboard operation
geoip2 copied to clipboard

Is it possible to get lat/lon ?

Open abrambailey opened this issue 10 years ago • 1 comments

I'd like to get lat/lon, or even just the full json array from MaxMind.. is this possible?

Geoip2.location('70.112.225.219')
NoMethodError: undefined method `location' for Geoip2:Module

http://dev.maxmind.com/geoip/geoip2/web-services/#location

abrambailey avatar Sep 30 '14 22:09 abrambailey

Took some trial and error. This is a paid service. There are 3 options: Country, City, Insights. See https://www.maxmind.com/en/geoip2-precision-services

Therefore, this gem allows Geoip2.country(ip-address) or Geoip2.city(ip-address) or Geoip2.insights(ip-address). Each one returns a hash with all the info.

In order to get lat-long you have to purchase the city or insights service.

nafmarcus avatar Nov 07 '14 18:11 nafmarcus