GUI-graticule 0.2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/CHANGELOG.txt +46 -0
  2. data/LICENSE.txt +30 -0
  3. data/Manifest.txt +73 -0
  4. data/README.txt +29 -0
  5. data/Rakefile +86 -0
  6. data/bin/geocode +5 -0
  7. data/init.rb +2 -0
  8. data/lib/graticule.rb +26 -0
  9. data/lib/graticule/cli.rb +64 -0
  10. data/lib/graticule/distance.rb +29 -0
  11. data/lib/graticule/distance/haversine.rb +40 -0
  12. data/lib/graticule/distance/spherical.rb +52 -0
  13. data/lib/graticule/distance/vincenty.rb +76 -0
  14. data/lib/graticule/geocoder.rb +21 -0
  15. data/lib/graticule/geocoder/base.rb +138 -0
  16. data/lib/graticule/geocoder/bogus.rb +15 -0
  17. data/lib/graticule/geocoder/geocoder_ca.rb +54 -0
  18. data/lib/graticule/geocoder/geocoder_us.rb +49 -0
  19. data/lib/graticule/geocoder/google.rb +122 -0
  20. data/lib/graticule/geocoder/host_ip.rb +41 -0
  21. data/lib/graticule/geocoder/local_search_maps.rb +45 -0
  22. data/lib/graticule/geocoder/map_quest.rb +111 -0
  23. data/lib/graticule/geocoder/meta_carta.rb +33 -0
  24. data/lib/graticule/geocoder/multi.rb +80 -0
  25. data/lib/graticule/geocoder/postcode_anywhere.rb +63 -0
  26. data/lib/graticule/geocoder/rest.rb +18 -0
  27. data/lib/graticule/geocoder/yahoo.rb +102 -0
  28. data/lib/graticule/location.rb +488 -0
  29. data/lib/graticule/version.rb +9 -0
  30. data/site/index.html +114 -0
  31. data/site/plugin.html +82 -0
  32. data/site/stylesheets/style.css +73 -0
  33. data/test/config.yml.default +36 -0
  34. data/test/fixtures/responses/geocoder_us/success.xml +18 -0
  35. data/test/fixtures/responses/geocoder_us/unknown.xml +1 -0
  36. data/test/fixtures/responses/google/badkey.xml +1 -0
  37. data/test/fixtures/responses/google/limit.xml +10 -0
  38. data/test/fixtures/responses/google/missing_address.xml +1 -0
  39. data/test/fixtures/responses/google/only_coordinates.xml +1 -0
  40. data/test/fixtures/responses/google/partial.xml +1 -0
  41. data/test/fixtures/responses/google/server_error.xml +10 -0
  42. data/test/fixtures/responses/google/success.xml +1 -0
  43. data/test/fixtures/responses/google/unavailable.xml +1 -0
  44. data/test/fixtures/responses/google/unknown_address.xml +1 -0
  45. data/test/fixtures/responses/host_ip/private.txt +4 -0
  46. data/test/fixtures/responses/host_ip/success.txt +4 -0
  47. data/test/fixtures/responses/host_ip/unknown.txt +4 -0
  48. data/test/fixtures/responses/local_search_maps/empty.txt +1 -0
  49. data/test/fixtures/responses/local_search_maps/not_found.txt +1 -0
  50. data/test/fixtures/responses/local_search_maps/success.txt +1 -0
  51. data/test/fixtures/responses/meta_carta/bad_address.xml +17 -0
  52. data/test/fixtures/responses/meta_carta/multiple.xml +33 -0
  53. data/test/fixtures/responses/meta_carta/success.xml +31 -0
  54. data/test/fixtures/responses/postcode_anywhere/badkey.xml +9 -0
  55. data/test/fixtures/responses/postcode_anywhere/canada.xml +16 -0
  56. data/test/fixtures/responses/postcode_anywhere/empty.xml +16 -0
  57. data/test/fixtures/responses/postcode_anywhere/success.xml +16 -0
  58. data/test/fixtures/responses/postcode_anywhere/uk.xml +18 -0
  59. data/test/fixtures/responses/yahoo/success.xml +3 -0
  60. data/test/fixtures/responses/yahoo/unknown_address.xml +6 -0
  61. data/test/mocks/uri.rb +52 -0
  62. data/test/test_helper.rb +32 -0
  63. data/test/unit/graticule/distance_test.rb +58 -0
  64. data/test/unit/graticule/geocoder/geocoder_us_test.rb +43 -0
  65. data/test/unit/graticule/geocoder/google_test.rb +126 -0
  66. data/test/unit/graticule/geocoder/host_ip_test.rb +40 -0
  67. data/test/unit/graticule/geocoder/local_search_maps_test.rb +30 -0
  68. data/test/unit/graticule/geocoder/meta_carta_test.rb +44 -0
  69. data/test/unit/graticule/geocoder/multi_test.rb +43 -0
  70. data/test/unit/graticule/geocoder/postcode_anywhere_test.rb +50 -0
  71. data/test/unit/graticule/geocoder/yahoo_test.rb +58 -0
  72. data/test/unit/graticule/geocoder_test.rb +27 -0
  73. data/test/unit/graticule/location_test.rb +66 -0
  74. metadata +158 -0
@@ -0,0 +1,9 @@
1
+ module Graticule #:nodoc:
2
+ module Version #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 2
5
+ TINY = 7
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
data/site/index.html ADDED
@@ -0,0 +1,114 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+ <title>Graticule</title>
8
+ <link rel="stylesheet" type="text/css" href="http://opensoul.org/stylesheets/code.css" />
9
+ <link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
10
+ <link href="http://opensoul.org/stylesheets/ci.css" rel="stylesheet" type="text/css" />
11
+ <script src="http://opensoul.org/javascripts/code_highlighter.js" type="text/javascript"></script>
12
+ <script src="http://opensoul.org/javascripts/ruby.js" type="text/javascript"></script>
13
+ </head>
14
+
15
+ <body>
16
+ <div id="collectiveidea">
17
+ <a href="http://collectiveidea.com"><img src="http://opensoul.org/images/header_logo.gif" alt="Collective Idea" class="logo" width="17" height="22" /></a>
18
+ <ul class="links">
19
+ <li><a href="http://daniel.collectiveidea.com/blog">Daniel</a></li>
20
+ <li><a href="http://opensoul.org">Brandon</a></li>
21
+ <li class="name"><a href="http://collectiveidea.com"><img src="http://opensoul.org/images/header_collectiveidea.gif" alt="Collective Idea" width="123" height="21" /></a></li>
22
+ </ul>
23
+ </div>
24
+ <div id="main">
25
+ <div id="header">
26
+ <h1><a href="/">Graticule</a></h1>
27
+ <ul id="nav">
28
+ <li><a href="graticule">API Docs</a></li>
29
+ <li><a href="plugin.html">Rails Plugin</a></li>
30
+ <li><a href="http://rubyforge.org/projects/graticule">RubyForge</a></li>
31
+ <li><a href="http://opensoul.org/tags/geocoding">Blog</a></li>
32
+ </ul>
33
+ </div>
34
+ <div id="content">
35
+ <dl lang="en" xml:lang="en">
36
+ <dt><strong>grat·i·cule</strong>, <span class="pronunciation">|ˈgratəˌkyoōl|</span>,
37
+ <em><abbr title="noun">n.</abbr></em>
38
+ <span class="description">technical</span>
39
+ </dt>
40
+ <dd><em>Navigation.</em> a network of parallels and meridians on a map or chart.</dd>
41
+ </dl>
42
+
43
+ <p>Graticule is a geocoding API for looking up address coordinates and performing distance calculations. It supports many popular APIs, including:</p>
44
+
45
+ <ul>
46
+ <li>Yahoo</li>
47
+ <li>Google</li>
48
+ <li>Geocoder.ca</li>
49
+ <li>Geocoder.us</li>
50
+ <li>PostcodeAnywhere</li>
51
+ <li>MetaCarta</li>
52
+ </ul>
53
+
54
+ <p>There is a <a href="plugin.html">companion Rails plugin</a> that makes geocoding seem like magic.</p>
55
+
56
+ <h2>Example</h2>
57
+
58
+ <pre><code class="ruby">require 'rubygems'
59
+ require 'graticule'
60
+ geocoder = Graticule.service(:google).new "api_key"
61
+ location = geocoder.locate "1600 Amphitheatre Parkway, Mountain View, CA"
62
+ location.coordinates #=> [37.423021, -122.083739]
63
+ location.country #=> "US"</code></pre>
64
+
65
+ <p>See the <a href="graticule">API documentation</a> for more details.</p>
66
+
67
+ <h2>International Support</h2>
68
+
69
+ <p>Graticule supports several services with international support. The international geocoders require slightly more structured data than the US ones:</p>
70
+
71
+ <pre><code class="ruby">g = Graticule.service(:local_search_maps).new
72
+ location = g.locate :street => '48 Leicester Square', :locality => 'London', :country => 'UK'
73
+ location.coordinates #=> [51.510036, -0.130427]</code></pre>
74
+
75
+ <h2>Distance Calculation</h2>
76
+
77
+ <p>Graticule includes 3 different distance formulas, Spherical (simplest but least accurate), Vincenty (most accurate and most complicated), and Haversine (somewhere inbetween).</p>
78
+
79
+ <pre><code class="ruby">location = geocoder.locate("Holland, MI")
80
+ location.distance_to(geocoder.locate("Chicago, IL"))
81
+ #=> 101.997458788177</code></pre>
82
+
83
+ <h2>Command Line</h2>
84
+ <p>Graticule also includes a command line interface to the various geocoders:</p>
85
+
86
+ <pre>
87
+ $ geocode -s yahoo -a yahookey Washington, DC
88
+ Washington, DC US
89
+ latitude: 38.895222, longitude: -77.036758</pre>
90
+
91
+ <h2>Installation</h2>
92
+
93
+ <p>Install the gem by executing:</p>
94
+
95
+ <pre>gem install graticule</pre>
96
+
97
+ <p>Or, download it from <a href="http://rubyforge.org/frs/?group_id=2643">RubyForge</a>.</p>
98
+
99
+ <h2>Contributing</h2>
100
+
101
+ <p>Contributions are welcome and appreciated! Join the <a href="http://rubyforge.org/mailman/listinfo/graticule-users">mailing list</a> and grab the source from:</p>
102
+
103
+ <pre>http://source.collectiveidea.com/public/geocode/trunk/</pre>
104
+ </div>
105
+ </div>
106
+
107
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
108
+ </script>
109
+ <script type="text/javascript">
110
+ _uacct = "UA-194397-7";
111
+ urchinTracker();
112
+ </script>
113
+ </body>
114
+ </html>
data/site/plugin.html ADDED
@@ -0,0 +1,82 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+ <title>acts_as_geocodable - Graticule</title>
8
+ <link rel="stylesheet" type="text/css" href="http://opensoul.org/stylesheets/code.css" />
9
+ <link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
10
+ <link href="http://opensoul.org/stylesheets/ci.css" rel="stylesheet" type="text/css" />
11
+ <script src="http://opensoul.org/javascripts/code_highlighter.js" type="text/javascript"></script>
12
+ <script src="http://opensoul.org/javascripts/ruby.js" type="text/javascript"></script>
13
+ </head>
14
+
15
+ <body>
16
+ <div id="collectiveidea">
17
+ <a href="http://collectiveidea.com"><img src="http://opensoul.org/images/header_logo.gif" alt="Collective Idea" class="logo" width="17" height="22" /></a>
18
+ <ul class="links">
19
+ <li><a href="http://daniel.collectiveidea.com/blog">Daniel</a></li>
20
+ <li><a href="http://opensoul.org">Brandon</a></li>
21
+ <li class="name"><a href="http://collectiveidea.com"><img src="http://opensoul.org/images/header_collectiveidea.gif" alt="Collective Idea" width="123" height="21" /></a></li>
22
+ </ul>
23
+ </div>
24
+ <div id="main">
25
+ <div id="header">
26
+ <h1><a href="/">Graticule</a> » acts_as_geocodable</h1>
27
+ <ul id="nav">
28
+ <li><a href="acts_as_geocodable">API Docs</a></li>
29
+ <li><a href="plugin.html">Rails Plugin</a></li>
30
+ <li><a href="http://rubyforge.org/projects/graticule">RubyForge</a></li>
31
+ <li><a href="http://opensoul.org/tags/geocoding">Blog</a></li>
32
+ </ul>
33
+ </div>
34
+ <div id="content">
35
+ <p>acts_as_geocodable is a Rails plugin that makes your applications geo-aware. A picture (er, example) is worth a thousand words:</p>
36
+
37
+ <h2>Examples</h2>
38
+
39
+ <pre><code class="ruby">event = Event.create :street =&gt; &quot;777 NE Martin Luther King, Jr. Blvd.&quot;,
40
+ :locality =&gt; &quot;Portland&quot;, :region =&gt; &quot;Oregon&quot;, :postal_code =&gt; 97232
41
+
42
+ # how far am I from RailsConf 2007?
43
+ event.distance_to &quot;49423&quot; #=&gt; 1807.66560483205
44
+
45
+ # Find our new event, and any other ones in the area
46
+ Event.find(:all, :within =&gt; 50, :origin =&gt; &quot;97232&quot;)
47
+
48
+ # Find the nearest restaurant with beer
49
+ Restaurant.find(:nearest, :origin =&gt; event, :conditions =&gt; 'beer = true')</code></pre>
50
+
51
+
52
+ <p>See the <a href="acts_as_geocodable">API documentation</a> for more details.</p>
53
+
54
+ <h2>IP-based geocoding</h2>
55
+
56
+ <p>acts_as_geocodable adds a <code>remote_location</code> method to your Rails controllers for retrieving a user's location based on their remote IP address.</p>
57
+
58
+ <pre><code class="ruby">@nearest_store = Store.find(:nearest, :origin =&gt; remote_location) if remote_location</code></pre>
59
+
60
+ <p>Don't rely too heavily on remote_location because the location of many IP addresses cannot be determined through <a href="http://hostip.info">HostIP</a>.
61
+
62
+ <h2>Installation</h2>
63
+
64
+ <p>Install the plugin by executing:</p>
65
+
66
+ <pre>script/plugin install -x http://source.collectiveidea.com/public/rails/plugins/acts_as_geocodable</pre>
67
+
68
+ <h2>Contributing</h2>
69
+
70
+ <p>Contributions are welcome and appreciated! Grab the source from:</p>
71
+
72
+ <pre>http://source.collectiveidea.com/public/rails/plugins/acts_as_geocodable</pre>
73
+ </div>
74
+ </div>
75
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
76
+ </script>
77
+ <script type="text/javascript">
78
+ _uacct = "UA-194397-7";
79
+ urchinTracker();
80
+ </script>
81
+ </body>
82
+ </html>
@@ -0,0 +1,73 @@
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
+ pre {
58
+ background-color: #2A2A2A;
59
+ }
60
+
61
+ dl {
62
+ background-color: #DDD;
63
+ padding: 1em;
64
+ border: 1px solid #CCC;
65
+ }
66
+ dl .pronunciation {
67
+ color: #C00;
68
+ }
69
+ dl .description {
70
+ text-transform: uppercase;
71
+ font-size: 0.8em;
72
+ font-family: fixed;
73
+ }
@@ -0,0 +1,36 @@
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
+ badkey.xml: http://maps.google.com/maps/geo?q=1600+amphitheatre+mtn+view+ca&output=xml&key=this_is_a_bad_key
6
+ missing_address.xml: http://maps.google.com/maps/geo?output=xml&key=:key
7
+ unavailable.xml: http://maps.google.com/maps/geo?q=42-44+Hanway+Street,+London&output=xml&key=:key
8
+ unknown_address.xml: http://maps.google.com/maps/geo?q=1600&output=xml&key=:key
9
+ partial.xml: http://maps.google.com/maps/geo?q=sf+ca&output=xml&key=:key
10
+ #limit.xml: no way to reproduce this
11
+ #server_error.xml: no way to reproduce this
12
+ geocoder_us:
13
+ responses:
14
+ success.xml: http://rpc.geocoder.us/service/rest/geocode?address=1600%20Pennsylvania%20Ave%20NW,%20Washington%20DC
15
+ unknown.xml: http://rpc.geocoder.us/service/rest/geocode?address=1600
16
+ host_ip:
17
+ responses:
18
+ private.txt: http://api.hostip.info/get_html.php?ip=192.168.0.1&position=true
19
+ success.txt: http://api.hostip.info/get_html.php?ip=64.233.167.99&position=true
20
+ unknown.txt: http://api.hostip.info/get_html.php?ip=254.254.254.254&position=true
21
+ local_search_maps:
22
+ responses:
23
+ success.txt: http://geo.localsearchmaps.com/?street=48+Leicester+Square&city=London&country=UK
24
+ empty.txt: http://geo.localsearchmaps.com/
25
+ not_found.txt: http://geo.localsearchmaps.com/?street=48
26
+ meta_carta:
27
+ responses:
28
+ bad_address.xml: http://labs.metacarta.com/GeoParser/?q=aoeueou&output=locations
29
+ # doesn't work
30
+ #multiple.xml: http://labs.metacarta.com/GeoParser/?q=seattle&output=locations
31
+ success.xml: http://labs.metacarta.com/GeoParser/?q=baghdad&output=locations
32
+ yahoo:
33
+ key: PUT YOUR KEY HERE
34
+ responses:
35
+ success.xml: http://api.local.yahoo.com/MapsService/V1/geocode?location=701%20First%20Street,%20Sunnyvale,%20CA&output=xml&appid=:key
36
+ 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 @@
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,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>