Browse Source

fix geocoder in static map

main
Aaron Parecki 7 years ago
parent
commit
a16ea634cc
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      p3k/geo/StaticMap.php

+ 3
- 3
p3k/geo/StaticMap.php View File

@ -1,6 +1,6 @@
<?php
namespace p3k\geo\StaticMap;
use p3k\geo\WebMercator;
use p3k\geo\WebMercator, p3k\Geocoder;
use Imagick, ImagickPixel, ImagickDraw;
function generate($params, $filename, $assetPath) {
@ -35,8 +35,8 @@ function generate($params, $filename, $assetPath) {
// Geocode the provided location and return lat/lng
if(array_key_exists('location', $properties)) {
$result = ArcGISGeocoder::geocode($properties['location']);
if(!$result->success) {
$result = Geocoder::geocode($properties['location']);
if(!$result) {
#header('X-Marker-' . ($i+1) . ': error geocoding location "' . $properties['location'] . '"');
continue;
}

Loading…
Cancel
Save