Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.53 KB

README.md

File metadata and controls

60 lines (42 loc) · 1.53 KB

geocoder-clj

Build Status Dependencies Status Gittip

A Clojure library for various geocoder services.

Installation

Via Clojars: http://clojars.org/geocoder-clj

Current Version

Usage

Bing

(require '[geocoder.bing :as bing])
(bing/geocode-address "Senefelderstraße 24, 10437 Berlin")
(bing/geocode-location "52.54258,13.42299")

Geonames

(require '[geocoder.geonames :as geonames])
(geonames/geocode-address "Senefelderstraße 24, 10437 Berlin")
(geonames/geocode-location "52.54258,13.42299")

Google

(require '[geocoder.google :as google])
(google/geocode-address "Senefelderstraße 24, 10437 Berlin")
(google/geocode-location "52.54258,13.42299")

Maxmind GeoIP

(require '[geocoder.maxmind :as maxmind])
(def db (maxmind/make-db "/usr/share/GeoIP/GeoIP.dat"))
(maxmind/geocode-ip-address db "92.229.192.11")

Maxmind GeoIP2

(require '[geocoder.maxmind2 :as maxmind2])
(def db (maxmind2/make-db "/usr/share/GeoIP/GeoLite2-City.mmdb"))
(maxmind2/geocode-ip-address db "92.229.192.11")

License

Copyright (C) 2013-2014 r0man

Distributed under the Eclipse Public License, the same as Clojure.