kikbal / simplegeolocation Goto Github PK
View Code? Open in Web Editor NEWThis project forked from esdras/simplegeolocation
A gem that fetch locations based on IP, ZIP and ordinary addresses through several existing geolocation gems.
This project forked from esdras/simplegeolocation
A gem that fetch locations based on IP, ZIP and ordinary addresses through several existing geolocation gems.
This gem was created with geolocation in mind, meaning that the main goal is to get a latitude and longitude, but it will return additional data if available. With this gem you can pass an IP number or an ZIP number or an ordinary address and it will try to get as many information as possible about the given argument. @usage gem install simple_geolocation require 'simple_geolocation' # Using with IP. location = SimpleGeolocation.Geocoder.new("74.125.113.104") location.geocode! geo.success? # => true location.city # => "Mountain View" location.state # => "CA" location.lat # => 37.41919999999999 location.lng # => -122.0574 location.provider # => "geoip" # Using with zipcode (Brazilian zipcode only) geo = SimpleGeolocation.Geocoder.new("22640100") geo.geocode! geo.success? # => true geo.street # => "Av. Das Américas" geo.district # => "Barra da Tijuca" geo.state # => "RJ" geo.city # => "Rio De Janeiro" geo.zip # => "22640-100" geo.lat # => -23.0032808 geo.lng # => -43.3230295 # Using with standard address geo = SimpleGeolocation::Geocoder.new("Rua do Principe, 199, Joinville, SC") geo.geocode! geo.success? # => true geo.lat # => -26.30101 geo.lng # => -48.8452974 geo.completeness # => 88 The returned attributes are: lat, lng, city, state, provider, zip, street, district, number
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.