- { :path => "/geocoder/search_latlon", :method => :get },
- { :controller => "geocoder", :action => "search_latlon" }
+ { :path => "/geocoder/search_latlon", :method => :get },
+ { :controller => "geocoder", :action => "search_latlon" }
- 'N 50° 04.064 E 014° 22.645',
- "N 50° 04.064' E 014° 22.645",
- "N 50° 04.064', E 014° 22.645'",
- 'N50° 04.064 E14° 22.645',
- 'N 50 04.064 E 014 22.645',
- 'N50 4.064 E14 22.645',
- "50° 04.064' N, 014° 22.645' E"
+ "N 50° 04.064 E 014° 22.645",
+ "N 50° 04.064' E 014° 22.645",
+ "N 50° 04.064', E 014° 22.645'",
+ "N50° 04.064 E14° 22.645",
+ "N 50 04.064 E 014 22.645",
+ "N50 4.064 E14 22.645",
+ "50° 04.064' N, 014° 22.645' E"
- 'N 50° 04.064 W 014° 22.645',
- "N 50° 04.064' W 014° 22.645",
- "N 50° 04.064', W 014° 22.645'",
- 'N50° 04.064 W14° 22.645',
- 'N 50 04.064 W 014 22.645',
- 'N50 4.064 W14 22.645',
- "50° 04.064' N, 014° 22.645' W"
+ "N 50° 04.064 W 014° 22.645",
+ "N 50° 04.064' W 014° 22.645",
+ "N 50° 04.064', W 014° 22.645'",
+ "N50° 04.064 W14° 22.645",
+ "N 50 04.064 W 014 22.645",
+ "N50 4.064 W14 22.645",
+ "50° 04.064' N, 014° 22.645' W"
- 'S 50° 04.064 E 014° 22.645',
- "S 50° 04.064' E 014° 22.645",
- "S 50° 04.064', E 014° 22.645'",
- 'S50° 04.064 E14° 22.645',
- 'S 50 04.064 E 014 22.645',
- 'S50 4.064 E14 22.645',
- "50° 04.064' S, 014° 22.645' E"
+ "S 50° 04.064 E 014° 22.645",
+ "S 50° 04.064' E 014° 22.645",
+ "S 50° 04.064', E 014° 22.645'",
+ "S50° 04.064 E14° 22.645",
+ "S 50 04.064 E 014 22.645",
+ "S50 4.064 E14 22.645",
+ "50° 04.064' S, 014° 22.645' E"
- 'S 50° 04.064 W 014° 22.645',
- "S 50° 04.064' W 014° 22.645",
- "S 50° 04.064', W 014° 22.645'",
- 'S50° 04.064 W14° 22.645',
- 'S 50 04.064 W 014 22.645',
- 'S50 4.064 W14 22.645',
- "50° 04.064' S, 014° 22.645' W"
+ "S 50° 04.064 W 014° 22.645",
+ "S 50° 04.064' W 014° 22.645",
+ "S 50° 04.064', W 014° 22.645'",
+ "S50° 04.064 W14° 22.645",
+ "S 50 04.064 W 014 22.645",
+ "S50 4.064 W14 22.645",
+ "50° 04.064' S, 014° 22.645' W"
# Test identification of lat/lon pairs using N/E with degrees/mins/secs
def test_identify_latlon_ne_dms
[
# Test identification of lat/lon pairs using N/E with degrees/mins/secs
def test_identify_latlon_ne_dms
[
- "N 50° 4' 03.828\" E 14° 22' 38.712\"",
- "N 50° 4' 03.828\", E 14° 22' 38.712\"",
- "N 50° 4′ 03.828″, E 14° 22′ 38.712″",
- 'N50 4 03.828 E14 22 38.712',
- 'N50 4 03.828, E14 22 38.712',
- "50°4'3.828\"N 14°22'38.712\"E"
+ "N 50° 4' 03.828\" E 14° 22' 38.712\"",
+ "N 50° 4' 03.828\", E 14° 22' 38.712\"",
+ "N 50° 4′ 03.828″, E 14° 22′ 38.712″",
+ "N50 4 03.828 E14 22 38.712",
+ "N50 4 03.828, E14 22 38.712",
+ "50°4'3.828\"N 14°22'38.712\"E"
# Test identification of lat/lon pairs using N/W with degrees/mins/secs
def test_identify_latlon_nw_dms
[
# Test identification of lat/lon pairs using N/W with degrees/mins/secs
def test_identify_latlon_nw_dms
[
- "N 50° 4' 03.828\" W 14° 22' 38.712\"",
- "N 50° 4' 03.828\", W 14° 22' 38.712\"",
- "N 50° 4′ 03.828″, W 14° 22′ 38.712″",
- 'N50 4 03.828 W14 22 38.712',
- 'N50 4 03.828, W14 22 38.712',
- "50°4'3.828\"N 14°22'38.712\"W"
+ "N 50° 4' 03.828\" W 14° 22' 38.712\"",
+ "N 50° 4' 03.828\", W 14° 22' 38.712\"",
+ "N 50° 4′ 03.828″, W 14° 22′ 38.712″",
+ "N50 4 03.828 W14 22 38.712",
+ "N50 4 03.828, W14 22 38.712",
+ "50°4'3.828\"N 14°22'38.712\"W"
# Test identification of lat/lon pairs using S/E with degrees/mins/secs
def test_identify_latlon_se_dms
[
# Test identification of lat/lon pairs using S/E with degrees/mins/secs
def test_identify_latlon_se_dms
[
- "S 50° 4' 03.828\" E 14° 22' 38.712\"",
- "S 50° 4' 03.828\", E 14° 22' 38.712\"",
- "S 50° 4′ 03.828″, E 14° 22′ 38.712″",
- 'S50 4 03.828 E14 22 38.712',
- 'S50 4 03.828, E14 22 38.712',
- "50°4'3.828\"S 14°22'38.712\"E"
+ "S 50° 4' 03.828\" E 14° 22' 38.712\"",
+ "S 50° 4' 03.828\", E 14° 22' 38.712\"",
+ "S 50° 4′ 03.828″, E 14° 22′ 38.712″",
+ "S50 4 03.828 E14 22 38.712",
+ "S50 4 03.828, E14 22 38.712",
+ "50°4'3.828\"S 14°22'38.712\"E"
# Test identification of lat/lon pairs using S/W with degrees/mins/secs
def test_identify_latlon_sw_dms
[
# Test identification of lat/lon pairs using S/W with degrees/mins/secs
def test_identify_latlon_sw_dms
[
- "S 50° 4' 03.828\" W 14° 22' 38.712\"",
- "S 50° 4' 03.828\", W 14° 22' 38.712\"",
- "S 50° 4′ 03.828″, W 14° 22′ 38.712″",
- 'S50 4 03.828 W14 22 38.712',
- 'S50 4 03.828, W14 22 38.712',
- "50°4'3.828\"S 14°22'38.712\"W"
+ "S 50° 4' 03.828\" W 14° 22' 38.712\"",
+ "S 50° 4' 03.828\", W 14° 22' 38.712\"",
+ "S 50° 4′ 03.828″, W 14° 22′ 38.712″",
+ "S50 4 03.828 W14 22 38.712",
+ "S50 4 03.828, W14 22 38.712",
+ "50°4'3.828\"S 14°22'38.712\"W"
def latlon_check(query, lat, lon)
post :search, :query => query
assert_response :success
assert_template "search"
assert_template :layout => "map"
def latlon_check(query, lat, lon)
post :search, :query => query
assert_response :success
assert_template "search"
assert_template :layout => "map"
assert_nil @controller.params[:query]
assert_in_delta lat, @controller.params[:lat]
assert_in_delta lon, @controller.params[:lon]
assert_nil @controller.params[:query]
assert_in_delta lat, @controller.params[:lat]
assert_in_delta lon, @controller.params[:lon]
assert_nil @controller.params[:query]
assert_in_delta lat, @controller.params[:lat]
assert_in_delta lon, @controller.params[:lon]
assert_nil @controller.params[:query]
assert_in_delta lat, @controller.params[:lat]
assert_in_delta lon, @controller.params[:lon]