Giter Site home page Giter Site logo

Comments (2)

mnoack avatar mnoack commented on June 20, 2024

@knzudgt - You shouldn't need to do anything (I don't actually use this feature, I just took over maintaining this gem)

See the IP related section of the readme:
https://github.com/geokit/geokit-rails#ip-geocoding-helper

If you want to do this yourself (as your code sample is doing), you don't need the geokit-rails gem, the code could be done with just the geokit gem by itself.

from geokit-rails.

ryankopf avatar ryankopf commented on June 20, 2024

Like @mnoack said, @knzudgt The geokit-rails gem is best used for adding geolocation features to your models. For example, if you have a "User" model, the user could have a lat and lng and you can find users that are near each other by calling something like User.by_distance(origin: @some_user)

If you just want plain 'ol geocoding features not specifically integrated in your models, you should just use the geokit gem, which is different from this geokit-rails gem.

As far as external services, any geocoding solution will require a third-party service unless it comes with download files. There are some services that offer free ip_address to country mappings that you can download and reference.

What CAN be done with geokit-rails without a third party solution is searching for records by distance using latitude and longitude values you've already saved in your database.

from geokit-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.