@@ -10,10 +10,10 @@ This product is designed to open to any Geocoding service. Based on it,
10
10
- [ Nominatim Search] ( http://open.mapquestapi.com/nominatim/ )
11
11
- [ Open Geocoding] ( http://open.mapquestapi.com/geocoding/ )
12
12
+ [ OpenCage] ( http://geocoder.opencagedata.com/api.html )
13
- + [ OpenStreetMap] ( https://wiki.openstreetmap.org/wiki/Nominatim )
14
13
+ [ HERE] ( https://developer.here.com/rest-apis/documentation/geocoder )
15
14
+ [ Bing] ( https://msdn.microsoft.com/en-us/library/ff701715.aspx )
16
15
+ [ Mapbox] ( https://www.mapbox.com/developers/api/geocoding/ )
16
+ + [ OpenStreetMap] ( https://wiki.openstreetmap.org/wiki/Nominatim )
17
17
18
18
clients are implemented in ~ 50 LoC each.
19
19
@@ -32,6 +32,7 @@ import (
32
32
" github.com/codingsince1985/geo-golang/mapquest/open"
33
33
" github.com/codingsince1985/geo-golang/opencage"
34
34
" github.com/codingsince1985/geo-golang/mapbox"
35
+ " github.com/codingsince1985/geo-golang/openstreetmap"
35
36
)
36
37
37
38
const addr = " Melbourne VIC"
@@ -58,6 +59,9 @@ func main() {
58
59
59
60
// Mapbox
60
61
try (mapbox.Geocoder (" YOUR_ACCESS_TOKEN" ))
62
+
63
+ // OpenStreetMap
64
+ try (openstreetmap.Geocoder ())
61
65
}
62
66
63
67
func try (geocoder geo .Geocoder ) {
@@ -96,6 +100,10 @@ Address of (-37.816742,144.964463) is 46 Elizabeth St, Melbourne, VIC 3000
96
100
// Mapbox
97
101
Melbourne VIC location is {-37.8142 144.9632}
98
102
Address of (-37.816742,144.964463) is Bankwest ATM, 43-55 Elizabeth St, 3000 Melbourne, Australia
103
+
104
+ // OpenStreetMap
105
+ Melbourne VIC location is {-37.8142175 144.9631608}
106
+ Address of (-37.816742,144.964463) is Bankwest, Elizabeth Street, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
99
107
```
100
108
License
101
109
==
0 commit comments