This commit is contained in:
2020-12-04 17:23:03 +00:00
parent 5f033393c8
commit 5e801582fd
2 changed files with 8 additions and 20 deletions

View File

@@ -669,10 +669,12 @@ export default {
postCode: m.vm.obj.postCode
}
*/
console.log(obj);
let hasGeo = obj.latitude && obj.longitude;
let hasGeo =
obj.latitude != null &&
obj.latitude != 0 &&
obj.longitude != null &&
obj.longitude != 0;
let hasAddress =
!this.stringIsNullOrEmpty(obj.address) &&
@@ -682,9 +684,7 @@ export default {
!this.stringIsNullOrEmpty(obj.postCode);
if (!hasGeo && !hasAddress) {
throw new Error(
"View map: missing address and latitude / longitude nothing to view"
);
return;
}
let mapUrl = window.$gz.store.state.userOptions.mapUrlTemplate;