@fleetbase/fleetops-engine 0.6.26 → 0.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composer.json +1 -1
- package/extension.json +1 -1
- package/package.json +1 -1
- package/server/src/Models/Place.php +2 -2
package/composer.json
CHANGED
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -301,7 +301,7 @@ class Place extends Model
|
|
|
301
301
|
*/
|
|
302
302
|
public static function getGoogleAddressArray(?\Geocoder\Provider\GoogleMaps\Model\GoogleAddress $address): array
|
|
303
303
|
{
|
|
304
|
-
$attributes = [];
|
|
304
|
+
$attributes = ['location' => new SpatialPoint(0, 0)];
|
|
305
305
|
|
|
306
306
|
if (!$address instanceof \Geocoder\Provider\GoogleMaps\Model\GoogleAddress) {
|
|
307
307
|
return $attributes;
|
|
@@ -383,7 +383,7 @@ class Place extends Model
|
|
|
383
383
|
$results = \Geocoder\Laravel\Facades\Geocoder::geocode($address)->get();
|
|
384
384
|
|
|
385
385
|
if ($results->isEmpty() || !$results->first()) {
|
|
386
|
-
return ['street1' => $address];
|
|
386
|
+
return ['street1' => $address, 'location' => new SpatialPoint(0, 0)];
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
return static::getGoogleAddressArray($results->first());
|