diff --git a/plugins/geocoder_handler/bing.inc b/plugins/geocoder_handler/bing.inc index 869e97b..c0d19fd 100644 --- a/plugins/geocoder_handler/bing.inc +++ b/plugins/geocoder_handler/bing.inc @@ -99,12 +99,16 @@ function geocoder_bing($address, $options = array()) { } } + if (empty($geometries)) { + return; + } + // The connonical geometry is the first result (best guesse) $geometry = array_shift($geometries); // If there are any other geometries, these are auxiliary geometries that represent "alternatives" if (count($geometries)) { - $geometry->data['geocoder_alternatives'] = $geometries; + $geometry->data->geocoder_alternatives = $geometries; } return $geometry;