src/Parser/Lanyrd/Entry.php 1 location
|
@@ 137-152 (lines=16) @@
|
| 134 |
|
} |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
protected function getLatLonForLocation($location) |
| 138 |
|
{ |
| 139 |
|
$result = $this->client->get(sprintf( |
| 140 |
|
'https://nominatim.openstreetmap.org/search?q=%1$s&format=json', |
| 141 |
|
urlencode($location) |
| 142 |
|
)); |
| 143 |
|
|
| 144 |
|
$locations = json_decode($result->getBody()->getContents()); |
| 145 |
|
|
| 146 |
|
if (empty($locations)) { |
| 147 |
|
return [0, 0]; |
| 148 |
|
} |
| 149 |
|
$location = $locations[0]; |
| 150 |
|
|
| 151 |
|
return [$location->lat, $location->lon]; |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
public function getEventPage($xpath) |
| 155 |
|
{ |
src/Parser/PapercallIo/Entry.php 1 location
|
@@ 136-151 (lines=16) @@
|
| 133 |
|
} |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
protected function getLatLonForLocation($location) |
| 137 |
|
{ |
| 138 |
|
$result = $this->client->get(sprintf( |
| 139 |
|
'https://nominatim.openstreetmap.org/search?q=%1$s&format=json', |
| 140 |
|
urlencode($location) |
| 141 |
|
)); |
| 142 |
|
|
| 143 |
|
$locations = json_decode($result->getBody()->getContents()); |
| 144 |
|
|
| 145 |
|
if (empty($locations)) { |
| 146 |
|
return [0, 0]; |
| 147 |
|
} |
| 148 |
|
$location = $locations[0]; |
| 149 |
|
|
| 150 |
|
return [$location->lat, $location->lon]; |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
public function getEventPage($xpath) |
| 154 |
|
{ |