File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,12 @@ A valid api key is required.
154154
155155### OpenStreetMapProvider ###
156156
157- The ` OpenStreetMapProvider ` named ` openstreetmap ` is able to geocode and reverse geocode ** street addresses** .
157+ The ` OpenStreetMapProvider ` named ` openstreetmap ` is able to geocode and reverse
158+ geocode ** street addresses** .
159+
160+ ** Warning:** The ` OpenStreetMapsProvider ` is ** deprecated** , and you should
161+ rather use the ` OpenStreetMapProvider ` . See issue
162+ [ #269 ] ( https://github.com/geocoder-php/Geocoder/issues/269 ) .
158163
159164### NominatimProvider ###
160165
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This file is part of the Geocoder package.
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ *
8+ * @license MIT License
9+ */
10+
11+ namespace Geocoder \Provider ;
12+
13+ use Geocoder \HttpAdapter \HttpAdapterInterface ;
14+
15+ /**
16+ * @author William Durand <william.durand1@gmail.com>
17+ */
18+ class OpenStreetMapsProvider extends OpenStreetMapProvider
19+ {
20+ /**
21+ * @param HttpAdapterInterface $adapter An HTTP adapter.
22+ * @param string $locale A locale (optional).
23+ */
24+ public function __construct (HttpAdapterInterface $ adapter , $ locale = null )
25+ {
26+ parent ::__construct ($ adapter , static ::ROOT_URL , $ locale );
27+
28+ trigger_error ('The `OpenStreetMapsProvider` is deprecated and will be removed. Use the `OpenStreetMapProvider` instead. ' , E_USER_DEPRECATED );
29+ }
30+
31+ /**
32+ * {@inheritDoc}
33+ */
34+ public function getName ()
35+ {
36+ return 'openstreetmaps ' ;
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments