Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7659b3f

Browse files
committed
Create gh-pages branch via GitHub
1 parent 85d9256 commit 7659b3f

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed

index.html

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6-
<title>Geocoder - The almost missing Geocoder PHP 5.3 library</title>
6+
<title>Geocoder by willdurand</title>
77

88
<link rel="stylesheet" href="stylesheets/styles.css">
99
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
@@ -31,9 +31,9 @@ <h1>Geocoder</h1>
3131
<h1>Geocoder</h1>
3232

3333
<p><strong>Geocoder</strong> is a library which helps you build geo-aware applications. It provides an abstraction layer for geocoding manipulations.
34-
The library is splitted in two parts: <code>HttpAdapter</code> and <code>Provider</code> and is really extensible.</p>
34+
The library is split in two parts: <code>HttpAdapter</code> and <code>Provider</code> and is really extensible.</p>
3535

36-
<p><a href="http://travis-ci.org/willdurand/Geocoder"><img src="https://secure.travis-ci.org/willdurand/Geocoder.png?branch=master" alt="Build Status"></a></p>
36+
<p><a href="http://travis-ci.org/willdurand/Geocoder"><img src="https://secure.travis-ci.org/willdurand/Geocoder.png" alt="Build Status"></a></p>
3737

3838
<h3>HttpAdapters</h3>
3939

@@ -70,6 +70,8 @@ <h3>HttpAdapters</h3>
7070
<li>
7171
<a href="http://code.google.com/apis/maps/documentation/geocoding/">Google Maps</a> as Address-Based geocoding and reverse geocoding provider;</li>
7272
<li>
73+
<a href="https://developers.google.com/maps/documentation/business/webservices">Google Maps for Business</a> as Address-Based geocoding and reverse geocoding provider;</li>
74+
<li>
7375
<a href="http://msdn.microsoft.com/en-us/library/ff701715.aspx">Bing Maps</a> as Address-Based geocoding and reverse geocoding provider;</li>
7476
<li>
7577
<a href="http://nominatim.openstreetmap.org/">OpenStreetMaps</a> as Address-Based geocoding and reverse geocoding provider;</li>
@@ -82,7 +84,7 @@ <h3>HttpAdapters</h3>
8284
<li>
8385
<a href="http://open.mapquestapi.com/">MapQuest</a> as Address-Based geocoding and reverse geocoding provider;</li>
8486
<li>
85-
<a href="http://geo.oiorest.dk/">OIORest</a> as very accurate Address-Based geocoding provider (exclusively in Denmark);</li>
87+
<a href="http://geo.oiorest.dk/">OIORest</a> as very accurate Address-Based geocoding and reverse geocoding provider (exclusively in Denmark);</li>
8688
<li>
8789
<a href="http://geocoder.ca/">GeoCoder.ca</a> as Address-Based geocoding and reverse geocoding provider (exclusively in USA &amp; Canada);</li>
8890
<li>
@@ -94,9 +96,11 @@ <h3>HttpAdapters</h3>
9496
<li>
9597
<a href="http://api.yandex.com.tr/maps/doc/geocoder/desc/concepts/About.xml">Yandex</a> as Address-Based geocoding and reverse geocoding provider;</li>
9698
<li>
97-
<a href="http://www.geoplugin.com/webservices">GeoPlugin</a> as IP-Based geocoding providers;</li>
99+
<a href="http://www.geoplugin.com/webservices">GeoPlugin</a> as IP-Based geocoding provider;</li>
100+
<li>
101+
<a href="http://www.geoips.com/developer/geoips-api">GeoIPs</a> as IP-Based geocoding provider;</li>
98102
<li>
99-
<a href="http://www.geoips.com/developer/geoips-api">GeoIPs</a> as IP-Based geocoding providers.</li>
103+
<a href="http://dev.maxmind.com/geoip/web-services">MaxMind web service</a> as IP-Based geocoding provider.</li>
100104
</ul><h2>Installation</h2>
101105

102106
<p>The recommended way to install Geocoder is through composer.</p>
@@ -123,7 +127,7 @@ <h3>HttpAdapters</h3>
123127
<span class="k">require</span> <span class="s1">'vendor/autoload.php'</span><span class="p">;</span>
124128
</pre></div>
125129

126-
<p>If you don't use neither <strong>Composer</strong> nor a <em>ClassLoader</em> in your application, just require the provided autoloader:</p>
130+
<p>If you don't use either <strong>Composer</strong> or a <em>ClassLoader</em> in your application, just require the provided autoloader:</p>
127131

128132
<div class="highlight"><pre><span class="o">&lt;?</span><span class="nx">php</span>
129133

@@ -203,7 +207,7 @@ <h3>MapQuestProvider</h3>
203207

204208
<h3>OIORestProvider</h3>
205209

206-
<p>The <code>OIORestProvider</code> is able to geocode <strong>street addresses</strong> only, exclusively in Denmark.</p>
210+
<p>The <code>OIORestProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in Denmark.</p>
207211

208212
<h3>GeocoderCaProvider</h3>
209213

@@ -240,6 +244,11 @@ <h3>GeoIPsProvider</h3>
240244
<p>The <code>GeoIPsProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.
241245
A valid api key is required.</p>
242246

247+
<h3>MaxMindProvider</h3>
248+
249+
<p>The <code>MaxMindProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.
250+
A valid api key is required.</p>
251+
243252
<p>You can use one of them or write your own provider. You can also register all providers and decide later.
244253
That's we'll do:</p>
245254

@@ -279,11 +288,15 @@ <h2>API</h2>
279288
<span class="c1">// }</span>
280289
<span class="c1">// "streetNumber" =&gt; string(0) ""</span>
281290
<span class="c1">// "streetName" =&gt; string(0) ""</span>
291+
<span class="c1">// "cityDistrict" =&gt; string(0) ""</span>
282292
<span class="c1">// "city" =&gt; string(7) "Orleans"</span>
283293
<span class="c1">// "zipcode" =&gt; string(0) ""</span>
284294
<span class="c1">// "county" =&gt; string(6) "Loiret"</span>
295+
<span class="c1">// "countyCode" =&gt; null</span>
285296
<span class="c1">// "region" =&gt; string(6) "Centre"</span>
297+
<span class="c1">// "regionCode" =&gt; null</span>
286298
<span class="c1">// "country" =&gt; string(6) "France"</span>
299+
<span class="c1">// "countryCode" =&gt; string(2) "FR"</span>
287300
<span class="c1">// "timezone" =&gt; string(6) "Europe/Paris"</span>
288301

289302
<span class="nv">$result</span> <span class="o">=</span> <span class="nv">$geocoder</span><span class="o">-&gt;</span><span class="na">geocode</span><span class="p">(</span><span class="s1">'10 rue Gambetta, Paris, France'</span><span class="p">);</span>
@@ -298,11 +311,15 @@ <h2>API</h2>
298311
<span class="c1">// }</span>
299312
<span class="c1">// "streetNumber" =&gt; string(2) "10"</span>
300313
<span class="c1">// "streetName" =&gt; string(15) "Avenue Gambetta"</span>
314+
<span class="c1">// "cityDistrict" =&gt; string(18) "20E Arrondissement"</span>
301315
<span class="c1">// "city" =&gt; string(5) "Paris"</span>
302316
<span class="c1">// "county" =&gt; string(5) "Paris"</span>
317+
<span class="c1">// "countyCode" =&gt; null</span>
303318
<span class="c1">// "zipcode" =&gt; string(5) "75020"</span>
304319
<span class="c1">// "region" =&gt; string(14) "Ile-de-France"</span>
320+
<span class="c1">// "regionCode" =&gt; null</span>
305321
<span class="c1">// "country" =&gt; string(6) "France"</span>
322+
<span class="c1">// "countryCode" =&gt; string(2) "FR"</span>
306323
<span class="c1">// "timezone" =&gt; string(6) "Europe/Paris"</span>
307324
</pre></div>
308325

@@ -330,15 +347,17 @@ <h2>API</h2>
330347
<li>
331348
<code>getCounty()</code> will return the <code>county</code>;</li>
332349
<li>
350+
<code>getCountyCode()</code> will return the <code>county</code> code (county short name);</li>
351+
<li>
333352
<code>getRegion()</code> will return the <code>region</code>;</li>
334353
<li>
335354
<code>getRegionCode()</code> will return the <code>region</code> code (region short name);</li>
336355
<li>
337356
<code>getCountry()</code> will return the <code>country</code>;</li>
338357
<li>
339-
<code>getCountryCode()</code> will return the ISO country code;</li>
358+
<code>getCountryCode()</code> will return the ISO <code>country</code> code;</li>
340359
<li>
341-
<code>getTimezone()</code> will return the timezone.</li>
360+
<code>getTimezone()</code> will return the <code>timezone</code>.</li>
342361
</ul><p>The Geocoder's API is fluent, you can write:</p>
343362

344363
<div class="highlight"><pre><span class="o">&lt;?</span><span class="nx">php</span>
@@ -350,7 +369,7 @@ <h2>API</h2>
350369
<span class="p">;</span>
351370
</pre></div>
352371

353-
<p>The <code>using()</code> method allows you to choose the <code>adapter</code> to use. When you deal with multiple adapters, you may want to
372+
<p>The <code>using()</code> method allows you to choose the <code>provider</code> to use. When you deal with multiple providers, you may want to
354373
choose one of them. The default behavior is to use the first one but it can be annoying.</p>
355374

356375
<h2>Reverse Geocoding</h2>
@@ -439,6 +458,7 @@ <h2>Formatter</h2>
439458
<li><p>City: <code>%L</code></p></li>
440459
<li><p>Zipcode: <code>%z</code></p></li>
441460
<li><p>County: <code>%P</code></p></li>
461+
<li><p>County Code: <code>%p</code></p></li>
442462
<li><p>Region: <code>%R</code></p></li>
443463
<li><p>Region Code: <code>%r</code></p></li>
444464
<li><p>Country: <code>%C</code></p></li>
@@ -479,6 +499,7 @@ <h2>Unit Tests</h2>
479499
<span class="c">&lt;!-- &lt;server name="CLOUDMADE_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
480500
<span class="c">&lt;!-- &lt;server name="IGN_WEB_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
481501
<span class="c">&lt;!-- &lt;server name="GEOIPS_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
502+
<span class="c">&lt;!-- &lt;server name="MAXMIND_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
482503
<span class="nt">&lt;/php&gt;</span>
483504
</pre></div>
484505

@@ -512,4 +533,4 @@ <h2>Credits</h2>
512533
</script>
513534

514535
</body>
515-
</html>
536+
</html>

0 commit comments

Comments
 (0)