8000 Create gh-pages branch via GitHub · geocoder-php/Geocoder@9fd70a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9fd70a2

Browse files
committed
Create gh-pages branch via GitHub
1 parent 8fc0d18 commit 9fd70a2

File tree

2 files changed

+62
-39
lines changed

2 files changed

+62
-39
lines changed

index.html

Lines changed: 61 additions & 38 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 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">
@@ -16,7 +16,7 @@
1616
<div class="wrapper">
1717
<header>
1818
<h1>Geocoder</h1>
19-
<p>The almost missing Geocoder PHP library</p>
19+
<p>The almost missing Geocoder PHP 5.3 library</p>
2020

2121
<p class="view"><a href="https://github.com/willdurand/Geocoder">View the Project on GitHub <small>willdurand/Geocoder</small></a></p>
2222

@@ -92,7 +92,7 @@ <h3>HttpAdapters</h3>
9292
<li>
9393
<a href="http://www.ign.fr/">IGN OpenLS</a> as Address-Based geocoding provider (exclusively in France);</li>
9494
<li>
95-
<a href="http://www.datasciencetoolkit.org/">DataScienceToolkit</a> as IP-Based geocoding provider;</li>
95+
<a href="http://www.datasciencetoolkit.org/">DataScienceToolkit</a> as IP-Based geocoding provider or an Address-Based provider (exclusively in USA &amp; Canada);</li>
9696
<li>
9797
<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>
9898
<li>
@@ -102,7 +102,11 @@ <h3>HttpAdapters</h3>
102102
<li>
103103
<a href="http://dev.maxmind.com/geoip/web-services">MaxMind web service</a> as IP-Based geocoding provider (City/ISP/Org and Omni services);</li>
104104
<li>
105-
<a href="http://www.geonames.org/">Geonames</a> as Place-Based geocoding and reverse geocoding provider.</li>
105+
<a href="http://www.geonames.org/">Geonames</a> as Place-Based geocoding and reverse geocoding provider;</li>
106+
<li>
107+
<a href="http://ipgeobase.ru/">IpGeoBase</a> as IP-Based geocoding provider (very accurate in Russia);</li>
108+
<li>
109+
<a href="http://developer.baidu.com/map/geocoding-api.htm">Baidu</a> as Address-Based geocoding and reverse geocoding provider (exclusively in China).</li>
106110
</ul><h2>Installation</h2>
107111

108112
<p>The recommended way to install Geocoder is through composer.</p>
@@ -159,109 +163,119 @@ <h2>Usage</h2>
159163

160164
<h3>FreeGeoIpProvider</h3>
161165

162-
<p>The <code>FreeGeoIpProvider</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only.</p>
166+
<p>The <code>FreeGeoIpProvider</code> named <code>free_geo_ip</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only.</p>
163167

164168
<h3>HostIpProvider</h3>
165169

166-
<p>The <code>HostIpProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.</p>
170+
<p>The <code>HostIpProvider</code> named <code>host_ip</code> is able to geocode <strong>IPv4 addresses</strong> only.</p>
167171

168172
<h3>IpInfoDbProvider</h3>
169173

170-
<p>The <code>IpInfoDbProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.
174+
<p>The <code>IpInfoDbProvider</code> named <code>ip_info_db</code> is able to geocode <strong>IPv4 addresses</strong> only.
171175
A valid api key is required.</p>
172176

173177
<h3>YahooProvider</h3>
174178

175-
<p>The <code>YahooProvider</code> is able to geocode both <strong>IPv4 addresses</strong> and <strong>street addresses</strong>.
176-
This provider can also reverse information based on coordinates (latitude, longitude).
179+
<p>The <code>YahooProvider</code> named <code>yahoo</code> is able to geocode both <strong>IPv4 addresses</strong> and <strong>street addresses</strong>. This provider can also reverse information based on coordinates (latitude, longitude).
177180
A valid api key is required.</p>
178181

179182
<h3>GoogleMapsProvider</h3>
180183

181-
<p>The <code>GoogleMapsProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
184+
<p>The <code>GoogleMapsProvider</code> named <code>google_maps</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
182185

183186
<h3>GoogleMapsBusinessProvider</h3>
184187

185-
<p>The <code>GoogleMapsBusinessProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
188+
<p>The <code>GoogleMapsBusinessProvider</code> named <code>google_maps_business</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
186189
A valid <code>Client ID</code> is required. The private key is optional.</p>
187190

188191
<h3>BingMapsProvider</h3>
189192

190-
<p>The <code>BingMapsProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
193+
<p>The <code>BingMapsProvider</code> named <code>bing_maps</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
191194
A valid api key is required.</p>
192195

193196
<h3>OpenStreetMapsProvider</h3>
194197

195-
<p>The <code>OpenStreetMapsProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
198+
<p>The <code>OpenStreetMapsProvider</code> named <code>openstreetmaps</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
196199

197200
<h3>CloudMadeProvider</h3>
198201

199-
<p>The <code>CloudMadeProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
202+
<p>The <code>CloudMadeProvider</code> named <code>cloudmade</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
200203
A valid api key is required.</p>
201204

202205
<h3>GeoipProvider</h3>
203206

204-
<p>The <code>GeoipProvider</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only. No need to use an <code>HttpAdapter</code> as it uses a local database.
207+
<p>The <code>GeoipProvider</code> named <code>geoip</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only. No need to use an <code>HttpAdapter</code> as it uses a local database.
205208
See the <a href="http://www.maxmind.com/app/php">MaxMind page</a> for more information.</p>
206209

207210
<h3>ChainProvider</h3>
208211

209-
<p>The <code>ChainProvider</code> is a special provider that takes a list of providers and iterates over this list to get information.</p>
212+
<p>The <code>ChainProvider</code> named <code>chain</code> is a special provider that takes a list of providers and iterates over this list to get information.</p>
210213

211214
<h3>MapQuestProvider</h3>
212215

213-
<p>The <code>MapQuestProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
216+
<p>The <code>MapQuestProvider</code> named <code>map_quest</code> is able to geocode and reverse geocode <strong>street addresses</strong>.</p>
214217

215218
<h3>OIORestProvider</h3>
216219

217-
<p>The <code>OIORestProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in Denmark.</p>
220+
<p>The <code>OIORestProvider</code> named <code>oio_rest</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in Denmark.</p>
218221

219222
<h3>GeocoderCaProvider</h3>
220223

221-
<p>The <code>GeocoderCaProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in USA &amp; Canada.</p>
224+
<p>The <code>GeocoderCaProvider</code> named <code>geocoder_ca</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in USA &amp; Canada.</p>
222225

223226
<h3>GeocoderUsProvider</h3>
224227

225-
<p>The <code>GeocoderUsProvider</code> is able to geocode <strong>street addresses</strong> only, exclusively in USA.</p>
228+
<p>The <code>GeocoderUsProvider</code> named <code>geocoder_us</code> is able to geocode <strong>street addresses</strong> only, exclusively in USA.</p>
226229

227230
<h3>IGNOpenLSProvider</h3>
228231

229-
<p>The <code>IGNOpenLSProvider</code> is able to geocode <strong>street addresses</strong> only, exclusively in France.
230-
A valid api key is required.</p>
232+
<p>The <code>IGNOpenLSProvider</code> named <code>ign_openls</code> is able to geocode <strong>street addresses</strong> only, exclusively in France.
233+
A valid OpenLS api key is required.</p>
231234

232235
<h3>DataScienceToolkitProvider</h3>
233236

234-
<p>The <code>DataScienceToolkitProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.</p>
237+
<p>The <code>DataScienceToolkitProvider</code> named <code>data_science_toolkit</code> is able to geocode <strong>IPv4 addresses</strong> and <strong>street adresses</strong>, exclusively in USA &amp; Canada.</p>
235238

236239
<h3>YandexProvider</h3>
237240

238-
<p>The <code>YandexProvider</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
241+
<p>The <code>YandexProvider</code> named <code>yandex</code> is able to geocode and reverse geocode <strong>street addresses</strong>.
239242
The default langage-locale is <code>ru-RU</code>, you can choose between <code>uk-UA</code>, <code>be-BY</code>,
240243
<code>en-US</code>, <code>en-BR</code> and <code>tr-TR</code>.
241244
This provider can also reverse information based on coordinates (latitude,
242-
longitude). It's possible to precise the toponym to get more accurate result:
245+
longitude). It's possible to precise the toponym to get more accurate result for reverse geocoding:
243246
<code>house</code>, <code>street</code>, <code>metro</code>, <code>district</code> and <code>locality</code>.</p>
244247

245248
<h3>GeoPluginProvider</h3> F42D
246249

247-
<p>The <code>GeoPluginProvider</code> is able to geocode <strong>IPv4 addresses and IPv6 addresses</strong> only.</p>
250+
<p>The <code>GeoPluginProvider</code> named <code>geo_plugin</code> is able to geocode <strong>IPv4 addresses and IPv6 addresses</strong> only.</p>
248251

249252
<h3>GeoIPsProvider</h3>
250253

251-
<p>The <code>GeoIPsProvider</code> is able to geocode <strong>IPv4 addresses</strong> only.
254+
<p>The <code>GeoIPsProvider</code> named <code>geo_ips</code> is able to geocode <strong>IPv4 addresses</strong> only.
252255
A valid api key is required.</p>
253256

254257
<h3>MaxMindProvider</h3>
255258

256-
<p>The <code>MaxMindProvider</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only.
259+
<p>The <code>MaxMindProvider</code> named <code>maxmind</code> is able to geocode <strong>IPv4 and IPv6 addresses</strong> only.
257260
A valid <code>City/ISP/Org</code> or <code>Omni</code> service's api key is required.
258261
This provider provides two constants <code>CITY_EXTENDED_SERVICE</code> by default and <code>OMNI_SERVICE</code>.</p>
259262

260263
<h3>GeonamesProvider</h3>
261264

262-
<p>The <code>GeonamesProvider</code> is able to geocode and reverse geocode <strong>places</strong>.
265+
<p>The <code>GeonamesProvider</code> named <code>geonames</code> is able to geocode and reverse geocode <strong>places</strong>.
263266
A valid username is required.</p>
264267

268+
<h3>IpGeoBaseProvider</h3>
269+
270+
<p>The <code>IpGeoBaseProvider</code> named <code>ip_geo_base</code> is able to geocode <strong>IPv4 addresses</strong> only, very accurate in Russia.</p>
271+
272+
<h3>BaiduProvider</h3>
273+
274+
<p>The <code>BaiduProvider</code> named <code>baidu</code> is able to geocode and reverse geocode <strong>street addresses</strong>, exclusively in China.
275+
A valid api key is required.</p>
276+
277+
<h3>Using The Providers</h3>
278+
265279
<p>You can use one of them or write your own provider. You can also register all providers and decide later.
266280
That's we'll do:</p>
267281

@@ -287,13 +301,20 @@ <h3>GeonamesProvider</h3>
287301
<span class="p">));</span>
288302
</pre></div>
289303

290-
<p>The <code>$locale</code> parameter is available for <code>YahooProvider</code>, <code>YandexProvider</code> and <code>BingMapsProvider</code>.<br>
291-
The <code>$region</code> parameter is available for <code>GoogleMapsProvider</code> and <code>GoogleMapsBusinessProvider</code>.<br>
292-
The <code>$toponym</code> parameter is available for <code>YandexProvider</code>.<br>
293-
The <code>$service</code> parameter is available for <code>MaxMindProvider</code>.<br>
294-
The <code>$useSsl</code> parameter is available for <code>GoogleMapsProvider</code>, <code>GoogleMapsBusinessProvider</code> and <code>MaxMindProvider</code>.</p>
304+
<p>Parameters:</p>
295305

296-
<p>Everything is ok, enjoy!</p>
306+
<ul>
307+
<li>
308+
<code>$locale</code> is available for <code>YahooProvider</code>, <code>YandexProvider</code> and <code>BingMapsProvider</code>.</li>
309+
<li>
310+
<code>$region</code> is available for <code>GoogleMapsProvider</code> and <code>GoogleMapsBusinessProvider</code>.</li>
311+
<li>
312+
<code>$toponym</code> is available for <code>YandexProvider</code>.</li>
313+
<li>
314+
<code>$service</code> is available for <code>MaxMindProvider</code>.</li>
315+
<li>
316+
<code>$useSsl</code> is available for <code>GoogleMapsProvider</code>, <code>GoogleMapsBusinessProvider</code> and <code>MaxMindProvider</code>.</li>
317+
</ul><p>Everything is ok, enjoy!</p>
297318

298319
<h2>API</h2>
299320

@@ -394,8 +415,9 @@ <h2>API</h2>
394415
<span class="p">;</span>
395416
</pre></div>
396417

397-
<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
398-
choose one of them. The default behavior is to use the first one but it can be annoying.</p>
418+
<p>The <code>using()</code> method allows you to choose the <code>provider</code> to use by its name.
419+
When you deal with multiple providers, you may want to choose one of them.
420+
The default behavior is to use the first one but it can be annoying.</p>
399421

400422
<h2>Reverse Geocoding</h2>
401423

@@ -527,6 +549,7 @@ <h2>Unit Tests</h2>
527549
<span class="c">&lt;!-- &lt;server name="GEOIPS_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
528550
<span class="c">&lt;!-- &lt;server name="MAXMIND_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
529551
<span class="c">&lt;!-- &lt;server name="GEONAMES_USERNAME" value="YOUR_USERNAME" /&gt; --&gt;</span>
552+
<span class="c">&lt;!-- &lt;server name="BAIDU_API_KEY" value="YOUR_API_KEY" /&gt; --&gt;</span>
530553
<span class="nt">&lt;/php&gt;</span>
531554
</pre></div>
532555

@@ -560,4 +583,4 @@ <h2>Credits</h2>
560583
</script>
561584

562585
</body>
563-
</html>
586+
</html>

0 commit comments

Comments
 (0)
0