geocoder 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of geocoder might be problematic. Click here for more details.
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/geocoder/lookups/esri.rb +8 -12
- data/lib/geocoder/version.rb +1 -1
- data/test/services_test.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@ Changelog
|
|
3
3
|
|
4
4
|
Per-release changes to Geocoder. Note that only major changes are summarized here. Please see the Git log for all changes.
|
5
5
|
|
6
|
+
1.1.8 (2013 Apr 22)
|
7
|
+
-------------------
|
8
|
+
|
9
|
+
* Fix bug in ESRI lookup that caused an exception on load in environments without rack/utils.
|
10
|
+
|
6
11
|
1.1.7 (2013 Apr 21)
|
7
12
|
-------------------
|
8
13
|
|
data/README.md
CHANGED
@@ -428,6 +428,7 @@ Yahoo BOSS is **not a free service**. As of November 17, 2012 Yahoo no longer of
|
|
428
428
|
* **Documentation**: http://resources.arcgis.com/en/help/arcgis-online-geocoding-rest-api/
|
429
429
|
* **Terms of Service**: http://www.esri.com/software/arcgis/arcgisonline/services/geoservices
|
430
430
|
* **Limitations**: ?
|
431
|
+
* **Notes**: You can specify which projection you want to use by setting, for example: `Geocoder.configure(:esri => {:outSR => 102100})`.
|
431
432
|
|
432
433
|
|
433
434
|
Caching
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'geocoder/lookups/base'
|
2
2
|
require "geocoder/results/esri"
|
3
|
-
require 'rack/utils'
|
4
3
|
|
5
4
|
module Geocoder::Lookup
|
6
5
|
class Esri < Base
|
@@ -33,20 +32,17 @@ module Geocoder::Lookup
|
|
33
32
|
end
|
34
33
|
|
35
34
|
def query_url_params(query)
|
35
|
+
params = {
|
36
|
+
:f => "pjson",
|
37
|
+
:outFields => "*"
|
38
|
+
}
|
36
39
|
if query.reverse_geocode?
|
37
|
-
|
38
|
-
:location => query.coordinates.reverse.join(','),
|
39
|
-
:outFields => :*,
|
40
|
-
:p => :pjson
|
41
|
-
}.merge(super)
|
40
|
+
params[:location] = query.coordinates.reverse.join(',')
|
42
41
|
else
|
43
|
-
|
44
|
-
:f => :pjson,
|
45
|
-
:outFields => :*,
|
46
|
-
:text => query.sanitized_text
|
47
|
-
}.merge(super)
|
42
|
+
params[:text] = query.sanitized_text
|
48
43
|
end
|
49
|
-
|
44
|
+
params.merge(super)
|
45
|
+
end
|
50
46
|
|
51
47
|
end
|
52
48
|
end
|
data/lib/geocoder/version.rb
CHANGED
data/test/services_test.rb
CHANGED
@@ -289,7 +289,7 @@ class ServicesTest < Test::Unit::TestCase
|
|
289
289
|
query = Geocoder::Query.new([45.423733, -75.676333])
|
290
290
|
lookup = Geocoder::Lookup.get(:esri)
|
291
291
|
res = lookup.query_url(query)
|
292
|
-
assert_equal "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location=-75.676333%2C45.423733&outFields=%2A
|
292
|
+
assert_equal "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?f=pjson&location=-75.676333%2C45.423733&outFields=%2A",
|
293
293
|
res
|
294
294
|
end
|
295
295
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Provides object geocoding (by street or IP address), reverse geocoding
|
15
15
|
(coordinates to street address), distance queries for ActiveRecord and Mongoid,
|