From 810a89ec4642b11dec4a2b0129cca10cc428a539 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 12 Nov 2020 23:25:32 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 2 ++ ayanova/src/api/gzutil.js | 3 ++ ayanova/src/views/cust-customer.vue | 1 + ayanova/src/views/home-user-settings.vue | 40 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 600ee449..1f784580 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -25,6 +25,8 @@ todo: After customer form is made ensure that a PHONE "tel" field can be triggered to make a phone call ensure EMAIL field can trigger email client if necessary add buttons to trigger that happening via javascript + ensure that a MAP url opens correctly from the customer form + Specifically test apple maps on the iPad because on other devices it redirects to google!? diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index 1cb993ce..e12f2ddb 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -548,6 +548,9 @@ export default { "https://www.google.com/maps/search/?api=1&query={aylatitude},{aylongitude}"; mapUrl = mapUrl.split("{aylatitude}").join(obj.latitude); mapUrl = mapUrl.split("{aylongitude}").join(obj.longitude); + if (obj.pointname) { + mapUrl = mapUrl.split("{aypointname}").join(obj.pointname); + } if (window.open(mapUrl, "map") == null) { throw new Error( "Problem displaying map in new window. Browser must allow pop-ups to view maps; check your browser setting" diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 792af4d5..226ad9f8 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -905,6 +905,7 @@ async function clickHandler(menuItem) { break; case "geoview": window.$gz.util.viewGeoLocation({ + pointname: m.vm.obj.name, latitude: m.vm.obj.latitude, longitude: m.vm.obj.longitude }); diff --git a/ayanova/src/views/home-user-settings.vue b/ayanova/src/views/home-user-settings.vue index 3d409e14..5da59149 100644 --- a/ayanova/src/views/home-user-settings.vue +++ b/ayanova/src/views/home-user-settings.vue @@ -170,6 +170,15 @@ export default { selectLists: { translations: [], mapUrls: [ + { + name: "Apple", + value: "http://maps.apple.com/?ll={aylatitude},{aylongitude}" + }, + { + name: "Bing", + value: + "https://bing.com/maps/default.aspx?cp={aylatitude}~{aylongitude}&lvl=17&style=r&sp=point.{aylatitude}_{aylongitude}_{aypointname}" + }, { name: "Google", value: @@ -179,6 +188,37 @@ export default { name: "Open Street Map", value: "https://www.openstreetmap.org/?mlat={aylatitude}&mlon={aylongitude}#map=17/{aylatitude}/{aylongitude}" + }, + { + name: "geo URI", + value: "geo:{aylatitude},{aylongitude}" + }, + { + name: "Waze", + value: + "https://www.waze.com/ul?ll={aylatitude},{aylongitude}&navigate=yes&zoom=17" + }, + { + name: "Yandex", + value: + "https://yandex.ru/maps/?ll={aylatitude},{aylongitude}&z=12&l=map" + }, + + { + name: "geo URI", + value: "geo:{aylatitude},{aylongitude}" + }, + { + name: "geo URI", + value: "geo:{aylatitude},{aylongitude}" + }, + { + name: "geo URI", + value: "geo:{aylatitude},{aylongitude}" + }, + { + name: "geo URI", + value: "geo:{aylatitude},{aylongitude}" } ] },