CodeMonkeySteve-graticule 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. data/.gitignore +4 -0
  2. data/CHANGELOG.txt +61 -0
  3. data/LICENSE.txt +30 -0
  4. data/Manifest.txt +85 -0
  5. data/README.txt +41 -0
  6. data/Rakefile +143 -0
  7. data/VERSION +1 -0
  8. data/bin/geocode +5 -0
  9. data/graticule.gemspec +144 -0
  10. data/init.rb +2 -0
  11. data/lib/graticule.rb +26 -0
  12. data/lib/graticule/cli.rb +64 -0
  13. data/lib/graticule/core_ext.rb +15 -0
  14. data/lib/graticule/distance.rb +18 -0
  15. data/lib/graticule/distance/haversine.rb +40 -0
  16. data/lib/graticule/distance/spherical.rb +52 -0
  17. data/lib/graticule/distance/vincenty.rb +76 -0
  18. data/lib/graticule/geocoder.rb +21 -0
  19. data/lib/graticule/geocoder/base.rb +112 -0
  20. data/lib/graticule/geocoder/bogus.rb +15 -0
  21. data/lib/graticule/geocoder/geocoder_ca.rb +54 -0
  22. data/lib/graticule/geocoder/geocoder_us.rb +51 -0
  23. data/lib/graticule/geocoder/google.rb +104 -0
  24. data/lib/graticule/geocoder/host_ip.rb +41 -0
  25. data/lib/graticule/geocoder/local_search_maps.rb +45 -0
  26. data/lib/graticule/geocoder/mapquest.rb +87 -0
  27. data/lib/graticule/geocoder/meta_carta.rb +33 -0
  28. data/lib/graticule/geocoder/multi.rb +46 -0
  29. data/lib/graticule/geocoder/multimap.rb +73 -0
  30. data/lib/graticule/geocoder/postcode_anywhere.rb +63 -0
  31. data/lib/graticule/geocoder/rest.rb +18 -0
  32. data/lib/graticule/geocoder/yahoo.rb +84 -0
  33. data/lib/graticule/location.rb +61 -0
  34. data/lib/graticule/version.rb +9 -0
  35. data/site/index.html +114 -0
  36. data/site/plugin.html +82 -0
  37. data/site/stylesheets/style.css +69 -0
  38. data/test/config.yml.default +37 -0
  39. data/test/fixtures/responses/geocoder_us/success.xml +18 -0
  40. data/test/fixtures/responses/geocoder_us/unknown.xml +1 -0
  41. data/test/fixtures/responses/google/badkey.xml +1 -0
  42. data/test/fixtures/responses/google/limit.xml +10 -0
  43. data/test/fixtures/responses/google/missing_address.xml +1 -0
  44. data/test/fixtures/responses/google/only_coordinates.xml +1 -0
  45. data/test/fixtures/responses/google/partial.xml +1 -0
  46. data/test/fixtures/responses/google/server_error.xml +10 -0
  47. data/test/fixtures/responses/google/success.xml +1 -0
  48. data/test/fixtures/responses/google/success_multiple_results.xml +88 -0
  49. data/test/fixtures/responses/google/success_on_options.xml +16 -0
  50. data/test/fixtures/responses/google/unavailable.xml +1 -0
  51. data/test/fixtures/responses/google/unknown_address.xml +1 -0
  52. data/test/fixtures/responses/host_ip/private.txt +4 -0
  53. data/test/fixtures/responses/host_ip/success.txt +4 -0
  54. data/test/fixtures/responses/host_ip/unknown.txt +4 -0
  55. data/test/fixtures/responses/local_search_maps/empty.txt +1 -0
  56. data/test/fixtures/responses/local_search_maps/not_found.txt +1 -0
  57. data/test/fixtures/responses/local_search_maps/success.txt +1 -0
  58. data/test/fixtures/responses/mapquest/multi_result.xml +1 -0
  59. data/test/fixtures/responses/mapquest/success.xml +1 -0
  60. data/test/fixtures/responses/meta_carta/bad_address.xml +17 -0
  61. data/test/fixtures/responses/meta_carta/multiple.xml +33 -0
  62. data/test/fixtures/responses/meta_carta/success.xml +31 -0
  63. data/test/fixtures/responses/multimap/missing_params.xml +4 -0
  64. data/test/fixtures/responses/multimap/no_matches.xml +4 -0
  65. data/test/fixtures/responses/multimap/success.xml +19 -0
  66. data/test/fixtures/responses/postcode_anywhere/badkey.xml +9 -0
  67. data/test/fixtures/responses/postcode_anywhere/canada.xml +16 -0
  68. data/test/fixtures/responses/postcode_anywhere/empty.xml +16 -0
  69. data/test/fixtures/responses/postcode_anywhere/success.xml +16 -0
  70. data/test/fixtures/responses/postcode_anywhere/uk.xml +18 -0
  71. data/test/fixtures/responses/yahoo/success.xml +3 -0
  72. data/test/fixtures/responses/yahoo/unknown_address.xml +6 -0
  73. data/test/mocks/uri.rb +52 -0
  74. data/test/test_helper.rb +31 -0
  75. data/test/unit/graticule/distance_test.rb +58 -0
  76. data/test/unit/graticule/geocoder/geocoder_us_test.rb +43 -0
  77. data/test/unit/graticule/geocoder/geocoders.rb +56 -0
  78. data/test/unit/graticule/geocoder/google_test.rb +127 -0
  79. data/test/unit/graticule/geocoder/host_ip_test.rb +40 -0
  80. data/test/unit/graticule/geocoder/local_search_maps_test.rb +30 -0
  81. data/test/unit/graticule/geocoder/mapquest_test.rb +47 -0
  82. data/test/unit/graticule/geocoder/meta_carta_test.rb +44 -0
  83. data/test/unit/graticule/geocoder/multi_test.rb +43 -0
  84. data/test/unit/graticule/geocoder/multimap_test.rb +52 -0
  85. data/test/unit/graticule/geocoder/postcode_anywhere_test.rb +50 -0
  86. data/test/unit/graticule/geocoder/yahoo_test.rb +48 -0
  87. data/test/unit/graticule/geocoder_test.rb +27 -0
  88. data/test/unit/graticule/location_test.rb +73 -0
  89. metadata +167 -0
@@ -0,0 +1,69 @@
1
+ body {
2
+ font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
3
+ font-size: 76%;
4
+ background: #2A2A2A;
5
+ margin: 0;
6
+ padding: 0;
7
+ }
8
+
9
+ #collectiveidea {
10
+ border-bottom: 1px solid #444;
11
+ }
12
+
13
+ a {
14
+ color: #2D5385;
15
+ }
16
+
17
+ #main {
18
+ background-color: #FFF;
19
+ width: 700px;
20
+ margin: 0 auto;
21
+ border: 5px #CCC;
22
+ border-left-style: solid;
23
+ border-right-style: solid;
24
+ padding: 0 1em;
25
+ }
26
+
27
+ #header {
28
+ position: relative;
29
+ }
30
+
31
+ #header h1 {
32
+ margin: 0;
33
+ padding: 0.5em 0;
34
+ color: #2D5385;
35
+ border-bottom: 1px solid #999;
36
+ }
37
+
38
+ #header h1 a {
39
+ text-decoration: none;
40
+ }
41
+
42
+ #nav {
43
+ list-style: none;
44
+ position: absolute;
45
+ right: 0;
46
+ top: 0.6em;
47
+ }
48
+ #nav li {
49
+ display: inline;
50
+ padding: 0 0.5em;
51
+ }
52
+
53
+ #content {
54
+ padding: 1em 0;
55
+ }
56
+
57
+ dl {
58
+ background-color: #DDD;
59
+ padding: 1em;
60
+ border: 1px solid #CCC;
61
+ }
62
+ dl .pronunciation {
63
+ color: #C00;
64
+ }
65
+ dl .description {
66
+ text-transform: uppercase;
67
+ font-size: 0.8em;
68
+ font-family: fixed;
69
+ }
@@ -0,0 +1,37 @@
1
+ google:
2
+ key: PUT YOUR KEY HERE
3
+ responses:
4
+ success.xml: http://maps.google.com/maps/geo?q=1600+amphitheatre+mtn+view+ca&output=xml&key=:key
5
+ success_on_options.xml: http://maps.google.com/maps/geo?q=Winnetka&output=xml&ll=34.197605,-118.546944&spn=0.247048,0.294914&key=:key
6
+ badkey.xml: http://maps.google.com/maps/geo?q=1600+amphitheatre+mtn+view+ca&output=xml&key=this_is_a_bad_key
7
+ missing_address.xml: http://maps.google.com/maps/geo?output=xml&key=:key
8
+ unavailable.xml: http://maps.google.com/maps/geo?q=42-44+Hanway+Street,+London&output=xml&key=:key
9
+ unknown_address.xml: http://maps.google.com/maps/geo?q=1600&output=xml&key=:key
10
+ partial.xml: http://maps.google.com/maps/geo?q=sf+ca&output=xml&key=:key
11
+ #limit.xml: no way to reproduce this
12
+ #server_error.xml: no way to reproduce this
13
+ geocoder_us:
14
+ responses:
15
+ success.xml: http://rpc.geocoder.us/service/rest/geocode?address=1600%20Pennsylvania%20Ave%20NW,%20Washington%20DC
16
+ unknown.xml: http://rpc.geocoder.us/service/rest/geocode?address=1600
17
+ host_ip:
18
+ responses:
19
+ private.txt: http://api.hostip.info/get_html.php?ip=192.168.0.1&position=true
20
+ success.txt: http://api.hostip.info/get_html.php?ip=64.233.167.99&position=true
21
+ unknown.txt: http://api.hostip.info/get_html.php?ip=254.254.254.254&position=true
22
+ local_search_maps:
23
+ responses:
24
+ success.txt: http://geo.localsearchmaps.com/?street=48+Leicester+Square&city=London&country=UK
25
+ empty.txt: http://geo.localsearchmaps.com/
26
+ not_found.txt: http://geo.localsearchmaps.com/?street=48
27
+ meta_carta:
28
+ responses:
29
+ bad_address.xml: http://labs.metacarta.com/GeoParser/?q=aoeueou&output=locations
30
+ # doesn't work
31
+ #multiple.xml: http://labs.metacarta.com/GeoParser/?q=seattle&output=locations
32
+ success.xml: http://labs.metacarta.com/GeoParser/?q=baghdad&output=locations
33
+ yahoo:
34
+ key: PUT YOUR KEY HERE
35
+ responses:
36
+ success.xml: http://api.local.yahoo.com/MapsService/V1/geocode?location=701%20First%20Street,%20Sunnyvale,%20CA&output=xml&appid=:key
37
+ unknown_address.xml: http://api.local.yahoo.com/MapsService/V1/geocode?location=thisprobablycantbefound&output=xml&appid=:key
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <rdf:RDF
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ >
7
+
8
+ <geo:Point rdf:nodeID="aid15626963">
9
+
10
+ <dc:description>1600 Pennsylvania Ave NW, Washington DC 20502</dc:description>
11
+ <geo:long>-77.037684</geo:long>
12
+ <geo:lat>38.898748</geo:lat>
13
+
14
+ </geo:Point>
15
+
16
+
17
+ </rdf:RDF>
18
+
@@ -0,0 +1 @@
1
+ couldn't find this address! sorry
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name>1600 amphitheatre mtn view ca</name><Status><code>610</code><request>geocode</request></Status></Response></kml>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <kml xmlns="http://earth.google.com/kml/2.0">
3
+ <Response>
4
+ <name>1600 Amphitheater Pkwy, Mountain View, CA</name>
5
+ <Status>
6
+ <code>620</code>
7
+ <request>geocode</request>
8
+ </Status>
9
+ </Response>
10
+ </kml>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name></name><Status><code>601</code><request>geocode</request></Status></Response></kml>
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><kml xmlns='http://earth.google.com/kml/2.0'><Response><name>15-17 </name><Status><code>200</code><request>geocode</request></Status><Placemark id='p1'><Point><coordinates>-17.000000,15.000000,0</coordinates></Point></Placemark></Response></kml>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name>sf ca</name><Status><code>200</code><request>geocode</request></Status><Placemark><address>San Francisco, CA, USA</address><AddressDetails Accuracy="4" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>US</CountryNameCode><AdministrativeArea><AdministrativeAreaName>CA</AdministrativeAreaName><Locality><LocalityName>San Francisco</LocalityName></Locality></AdministrativeArea></Country></AddressDetails><Point><coordinates>-122.418333,37.775000,0</coordinates></Point></Placemark></Response></kml>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <kml xmlns="http://earth.google.com/kml/2.0">
3
+ <Response>
4
+ <name>1600 Amphitheater Pkwy, Mountain View, CA</name>
5
+ <Status>
6
+ <code>500</code>
7
+ <request>geocode</request>
8
+ </Status>
9
+ </Response>
10
+ </kml>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name>1600 amphitheatre mtn view ca</name><Status><code>200</code><request>geocode</request></Status><Placemark><address>1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA</address><AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>US</CountryNameCode><AdministrativeArea><AdministrativeAreaName>CA</AdministrativeAreaName><SubAdministrativeArea><SubAdministrativeAreaName>Santa Clara</SubAdministrativeAreaName><Locality><LocalityName>Mountain View</LocalityName><Thoroughfare><ThoroughfareName>1600 Amphitheatre Pkwy</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>94043</PostalCodeNumber></PostalCode></Locality></SubAdministrativeArea></AdministrativeArea></Country></AddressDetails><Point><coordinates>-122.083739,37.423021,0</coordinates></Point></Placemark></Response></kml>
@@ -0,0 +1,88 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <kml xmlns='http://earth.google.com/kml/2.0'><Response>
3
+ <name>Queen St West</name>
4
+ <Status>
5
+ <code>200</code>
6
+ <request>geocode</request>
7
+ </Status>
8
+ <Placemark id='p1'>
9
+ <address>Queen St W, Toronto, ON, Canada</address>
10
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Toronto</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare></Locality></AdministrativeArea></Country></AddressDetails>
11
+ <ExtendedData>
12
+ <LatLonBox east='-79.3792510' south='43.6387420' west='-79.4460830' north='43.6524210'/>
13
+ </ExtendedData>
14
+ <Point><coordinates>-79.4125590,43.6455030,0</coordinates></Point>
15
+ </Placemark>
16
+ <Placemark id='p2'>
17
+ <address>Queen St W, Brampton, ON, Canada</address>
18
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Brampton</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare></Locality></AdministrativeArea></Country></AddressDetails>
19
+ <ExtendedData>
20
+ <LatLonBox east='-79.7599410' south='43.6477210' west='-79.8030440' north='43.6859000'/>
21
+ </ExtendedData>
22
+ <Point><coordinates>-79.7814960,43.6665410,0</coordinates></Point>
23
+ </Placemark>
24
+ <Placemark id='p3'>
25
+ <address>Queen St W, Levin, 5510, New Zealand</address>
26
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>NZ</CountryNameCode><CountryName>New Zealand</CountryName><Locality><LocalityName>Levin</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>5510</PostalCodeNumber></PostalCode></Locality></Country></AddressDetails>
27
+ <ExtendedData>
28
+ <LatLonBox east='175.2872230' south='-40.6221080' west='175.2645080' north='-40.6111560'/>
29
+ </ExtendedData>
30
+ <Point><coordinates>175.2753040,-40.6170160,0</coordinates></Point>
31
+ </Placemark>
32
+ <Placemark id='p4'>
33
+ <address>Queen St W, Mt Forest, ON, Canada</address>
34
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Mt Forest</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>N0G</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
35
+ <ExtendedData>
36
+ <LatLonBox east='-80.7320620' south='43.9748569' west='-80.7542680' north='43.9811521'/>
37
+ </ExtendedData>
38
+ <Point><coordinates>-80.7434380,43.9779890,0</coordinates></Point>
39
+ </Placemark>
40
+ <Placemark id='p5'>
41
+ <address>Queen St W, St Marys, ON, Canada</address>
42
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>St Marys</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>N4X</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
43
+ <ExtendedData>
44
+ <LatLonBox east='-81.1442510' south='43.2548039' west='-81.1674090' north='43.2610991'/>
45
+ </ExtendedData>
46
+ <Point><coordinates>-81.1556430,43.2579490,0</coordinates></Point>
47
+ </Placemark>
48
+ <Placemark id='p6'>
49
+ <address>Queen St W, Barrie, ON, Canada</address>
50
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Barrie</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>L0L</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
51
+ <ExtendedData>
52
+ <LatLonBox east='-79.8661300' south='44.5748470' west='-79.8859520' north='44.5835790'/>
53
+ </ExtendedData>
54
+ <Point><coordinates>-79.8762460,44.5791840,0</coordinates></Point>
55
+ </Placemark>
56
+ <Placemark id='p7'>
57
+ <address>Queen St W, Owen Sound, ON, Canada</address>
58
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Owen Sound</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>N0H</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
59
+ <ExtendedData>
60
+ <LatLonBox east='-81.1333070' south='44.6303544' west='-81.1489540' north='44.6366496'/>
61
+ </ExtendedData>
62
+ <Point><coordinates>-81.1428830,44.6334130,0</coordinates></Point>
63
+ </Placemark>
64
+ <Placemark id='p8'>
65
+ <address>Queen St W, Mississauga, ON, Canada</address>
66
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Mississauga</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>L5H</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
67
+ <ExtendedData>
68
+ <LatLonBox east='-79.5927510' south='43.5315270' west='-79.6117140' north='43.5498140'/>
69
+ </ExtendedData>
70
+ <Point><coordinates>-79.6023990,43.5407460,0</coordinates></Point>
71
+ </Placemark>
72
+ <Placemark id='p9'>
73
+ <address>Queen St W, Cambridge, ON, Canada</address>
74
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Cambridge</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>N3C</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
75
+ <ExtendedData>
76
+ <LatLonBox east='-80.3108330' south='43.4202100' west='-80.3287680' north='43.4312910'/>
77
+ </ExtendedData>
78
+ <Point><coordinates>-80.3202040,43.4267810,0</coordinates></Point>
79
+ </Placemark>
80
+ <Placemark id='p10'>
81
+ <address>Queen St W, Sault Ste. Marie, ON, Canada</address>
82
+ <AddressDetails Accuracy='6' xmlns='urn:oasis:names:tc:ciq:xsdschema:xAL:2.0'><Country><CountryNameCode>CA</CountryNameCode><CountryName>Canada</CountryName><AdministrativeArea><AdministrativeAreaName>ON</AdministrativeAreaName><Locality><LocalityName>Sault Ste. Marie</LocalityName><Thoroughfare><ThoroughfareName>Queen St W</ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>P6A</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails>
83
+ <ExtendedData>
84
+ <LatLonBox east='-84.3411900' south='46.5155194' west='-84.3592850' north='46.5218146'/>
85
+ </ExtendedData>
86
+ <Point><coordinates>-84.3506780,46.5187300,0</coordinates></Point>
87
+ </Placemark>
88
+ </Response></kml>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <kml xmlns="http://earth.google.com/kml/2.0"><Response>
3
+ <name>Winnetka</name>
4
+ <Status>
5
+ <code>200</code>
6
+ <request>geocode</request>
7
+ </Status>
8
+ <Placemark id="p1">
9
+ <address>Winnetka, Los Angeles, CA, USA</address>
10
+ <AddressDetails Accuracy="4" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</CountryName><AdministrativeArea><AdministrativeAreaName>CA</AdministrativeAreaName><Locality><LocalityName>Los Angeles</LocalityName><DependentLocality><DependentLocalityName>Winnetka</DependentLocalityName></DependentLocality></Locality></AdministrativeArea></Country></AddressDetails>
11
+ <ExtendedData>
12
+ <LatLonBox north="34.2316232" south="34.1947148" east="-118.5390072" west="-118.6030368" />
13
+ </ExtendedData>
14
+ <Point><coordinates>-118.5710220,34.2131710,0</coordinates></Point>
15
+ </Placemark>
16
+ </Response></kml>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name>42-44 Hanway Street, London</name><Status><code>602</code><request>geocode</request></Status></Response></kml>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.1"><Response><name>1600</name><Status><code>602</code><request>geocode</request></Status></Response></kml>
@@ -0,0 +1,4 @@
1
+ Country: (Private Address) (XX)
2
+ City: (Private Address)
3
+ Latitude:
4
+ Longitude:
@@ -0,0 +1,4 @@
1
+ Country: UNITED STATES (US)
2
+ City: Mountain View, CA
3
+ Latitude: 37.402
4
+ Longitude: -122.078
@@ -0,0 +1,4 @@
1
+ Country: (Unknown Country?) (XX)
2
+ City: (Unknown City?)
3
+ Latitude:
4
+ Longitude:
@@ -0,0 +1 @@
1
+ alert('Please provide a location');
@@ -0,0 +1 @@
1
+ alert('location not found');
@@ -0,0 +1 @@
1
+ map.centerAndZoom(new GPoint(-0.130427, 51.510036), 4);
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?><GeocodeResponse><LocationCollection Count="10"><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Suffolk County</AdminArea4><AdminArea5>Stony Brook</AdminArea5><LatLng><Lat>40.925598</Lat><Lng>-73.141403</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Rockland County</AdminArea4><AdminArea5>Stony Point</AdminArea5><LatLng><Lat>41.229401</Lat><Lng>-73.987503</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Dutchess County</AdminArea4><AdminArea5>Staatsburg</AdminArea5><LatLng><Lat>41.849701</Lat><Lng>-73.930603</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Delaware County</AdminArea4><AdminArea5>Stamford</AdminArea5><LatLng><Lat>42.407200</Lat><Lng>-74.614700</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Clinton County</AdminArea4><AdminArea5>Standish</AdminArea5><LatLng><Lat>44.689201</Lat><Lng>-73.949402</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Albany County</AdminArea4><AdminArea5>Stanford Heights</AdminArea5><LatLng><Lat>42.765598</Lat><Lng>-73.889397</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Dutchess County</AdminArea4><AdminArea5>Stanfordville</AdminArea5><LatLng><Lat>41.867199</Lat><Lng>-73.714699</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Allegany County</AdminArea4><AdminArea5>Stannards</AdminArea5><LatLng><Lat>42.086399</Lat><Lng>-77.922501</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Saint Lawrence County</AdminArea4><AdminArea5>Star Lake</AdminArea5><LatLng><Lat>44.159698</Lat><Lng>-75.031898</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>NY</AdminArea3><AdminArea4>Rensselaer County</AdminArea4><AdminArea5>Stephentown</AdminArea5><LatLng><Lat>42.548599</Lat><Lng>-73.374397</Lng></LatLng><ResultCode>A5XCX</ResultCode><SourceId>gaz_us</SourceId></GeoAddress></LocationCollection></GeocodeResponse>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?><GeocodeResponse><LocationCollection Count="1"><GeoAddress><AdminArea1>US</AdminArea1><AdminArea3>ME</AdminArea3><AdminArea4>Oxford County</AdminArea4><AdminArea5>Lovell</AdminArea5><PostalCode>04051-3919</PostalCode><Street>44 Allen Rd</Street><LatLng><Lat>44.152019</Lat><Lng>-70.892706</Lng></LatLng><ResultCode>L1AAA</ResultCode><SourceId>navt</SourceId></GeoAddress></LocationCollection></GeocodeResponse>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+
3
+ <!DOCTYPE Locations SYSTEM "Locations.dtd">
4
+
5
+ <Locations
6
+ xmlns:gml="http://www.opengis.net/gml"
7
+ CreatedBy="MetaCarta GeoParser v3.7.0-labs"
8
+ CreatedOn="Wed Apr 25 22:12:33 2007"
9
+ ConvertedFromBinaryFormat="0"
10
+ InputByteLength="0">
11
+ <ViewBox>
12
+
13
+ <gml:Box srsName="epsg:4326">
14
+ <gml:coordinates>-180.000000,-90.000000 180.000000,90.000000</gml:coordinates>
15
+ </gml:Box>
16
+ </ViewBox>
17
+ </Locations>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE Locations SYSTEM "Locations.dtd">
3
+ <Locations xmlns:gml="http://www.opengis.net/gml" CreatedBy="MetaCarta GeoParser v3.5.0-labs-alpha" CreatedOn="Sat Jun 17 02:14:05 2006" ConvertedFromBinaryFormat="False" InputByteLength="1">
4
+ <ViewBox>
5
+ <gml:Box srsName="epsg:4326">
6
+ <gml:coordinates>43.800000,-126.133333 51.406390,-118.530830</gml:coordinates>
7
+ </gml:Box>
8
+ </ViewBox>
9
+ <Location Name="Seattle" Type="PPL" Population="563374" Hierarchy="United States/Washington/King/Seattle">
10
+ <ViewBox>
11
+ <gml:Box srsName="epsg:4326">
12
+ <gml:coordinates>43.806390,-126.130830 51.406390,-118.530830</gml:coordinates>
13
+ </gml:Box>
14
+ </ViewBox>
15
+ <Centroid>
16
+ <gml:Point>
17
+ <gml:coordinates>-122.330830000000006,47.606389999999998</gml:coordinates>
18
+ </gml:Point>
19
+ </Centroid>
20
+ </Location>
21
+ <Location Name="Seattle" Type="PRT" Population="-1" Hierarchy="United States/Seattle">
22
+ <ViewBox>
23
+ <gml:Box srsName="epsg:4326">
24
+ <gml:coordinates>43.800000,-126.133333 51.400000,-118.533333</gml:coordinates>
25
+ </gml:Box>
26
+ </ViewBox>
27
+ <Centroid>
28
+ <gml:Point>
29
+ <gml:coordinates>-122.333332999999996,47.6</gml:coordinates>
30
+ </gml:Point>
31
+ </Centroid>
32
+ </Location>
33
+ </Locations>
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+
3
+ <!DOCTYPE Locations SYSTEM "Locations.dtd">
4
+
5
+ <Locations
6
+ xmlns:gml="http://www.opengis.net/gml"
7
+ CreatedBy="MetaCarta GeoParser v3.7.0-labs"
8
+ CreatedOn="Wed Apr 25 22:12:33 2007"
9
+ ConvertedFromBinaryFormat="0"
10
+ InputByteLength="0">
11
+ <ViewBox>
12
+
13
+ <gml:Box srsName="epsg:4326">
14
+ <gml:coordinates>43.593900,32.538600 45.193900,34.138600</gml:coordinates>
15
+ </gml:Box>
16
+ </ViewBox>
17
+ <Location
18
+
19
+ Name="Baghdad"
20
+ Type=""
21
+ Population="-1"
22
+ Hierarchy="">
23
+ <ViewBox>
24
+ <gml:Box srsName="epsg:4326">
25
+ <gml:coordinates>43.593900,32.538600 45.193900,34.138600</gml:coordinates>
26
+ </gml:Box>
27
+ </ViewBox>
28
+ <RemainingQuery></RemainingQuery>
29
+ <Confidence>0.566875</Confidence> <Centroid><gml:Point><gml:coordinates>44.393900000000002,33.3386</gml:coordinates></gml:Point></Centroid>
30
+ </Location>
31
+ </Locations>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <Results xmlns="http://clients.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://clients.multimap.com/API http://clients.multimap.com/Schema/geocode_1.2.xsd"
4
+ errorCode="MM_GEOCODE_REQUIRED_PARAMETERS_MISSING" locationCount="0" />
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <Results xmlns="http://clients.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://clients.multimap.com/API http://clients.multimap.com/Schema/geocode_1.2.xsd"
4
+ errorCode="MM_GEOCODE_NO_MATCHES" locationCount="0" />
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <Results xmlns="http://clients.multimap.com/API" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://clients.multimap.com/API http://clients.multimap.com/Schema/geocode_1.2.xsd" locationCount="1">
4
+ <Location geocodeQuality="1">
5
+ <Address>
6
+ <Street>Oxford Street</Street>
7
+ <Areas>
8
+ <Area>LONDON</Area>
9
+ </Areas>
10
+ <PostalCode>W1</PostalCode>
11
+ <DisplayName>Oxford Street, LONDON, W1</DisplayName>
12
+ <CountryCode>GB</CountryCode>
13
+ </Address>
14
+ <Point>
15
+ <Lat>51.51452</Lat>
16
+ <Lon>-0.14839</Lon>
17
+ </Point>
18
+ </Location>
19
+ </Results>
@@ -0,0 +1,9 @@
1
+ <PostcodeAnywhere Server="WS12" Version="3.0" Date="12/03/2007 15:43:33" Duration="0.016s">
2
+ <Schema Items="2">
3
+ <Field Name="error_number"/>
4
+ <Field Name="message"/>
5
+ </Schema>
6
+ <Data Items="1">
7
+ <Item error_number="6" message="License key was not recognised"/>
8
+ </Data>
9
+ </PostcodeAnywhere>