From da91700fa1ed5fb156217e2f44275883ee5776d9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 12 Nov 2020 22:14:09 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 19 ++++--------- ayanova/src/api/gzutil.js | 14 +++------- ayanova/src/views/cust-customer.vue | 1 + ayanova/src/views/home-user-settings.vue | 35 ++++++++++++++++++++++-- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 9e7bef2d..600ee449 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -11,20 +11,13 @@ todo: Uifielddatatype Phone and TimeSpan support at client, translation keys etc todo: input type email url phone number etc supported on device to activate? if not, it must be supported somehow so figure it out -todo: latitude longitude - windows ayanova uses a special control to enter in degrees m seconds not decimal input?! - needs replacement decimal control or something else, can't use precision more than two decimal places - NOTE: check docs, maybe it's a setting on the existing control? - Ideally a coordinate specific input, check around - at least replicate windows ayanova if nothing else, check web interfaces to see what was done there - https://tutorialzine.com/2016/06/quick-tip-detecting-your-location-with-javascript +todo: map url template should be set in user options with click to set various but defaults to google + google maps + open street map + bing maps? + apple maps? + mapquest? - TODO: Make composite control for display and input - Use decimal degrees - lat above with title and long below with title - icon to grab current coordinates "map-marker-alt" - icon to view on a map with "map-marked-alt" - if a mapping url is defined todo: After customer form is made diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index f93e35dc..6a99e7f7 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -490,16 +490,10 @@ export default { /////////////////////////////////////////////// // Use geolocation api to attempt to get current location // try high accuracy first and downgrade if unavailable - // - - // function getCurrentLocation(options) { - // return new Promise((resolve, reject) => { - // navigator.geolocation.getCurrentPosition(resolve, ({code, message}) => - // reject(Object.assign(new Error(message), {name: "PositionError", code})), - // options); - // }); - // }; - + //https://www.openstreetmap.org/?mlat=48.3911&mlon=-124.7353#map=12/48.3910/-124.7353 + //https://www.openstreetmap.org/#map=18/49.68155/-125.00435 + //https://www.openstreetmap.org/?mlat=49.71236&mlon=-124.96961#map=17/49.71236/-124.96961 + //https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393 getGeoLocation: async function() { return new Promise((resolve, reject) => { navigator.geolocation.getCurrentPosition( diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index fdaf0b76..3e51e097 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -892,6 +892,7 @@ async function clickHandler(menuItem) { break; case "geocapture": try { + window.$gz.form.deleteAllErrorBoxErrors(m.vm); let loc = await window.$gz.util.getGeoLocation(); m.vm.obj.latitude = loc.latitude; m.vm.fieldValueChanged("latitude"); diff --git a/ayanova/src/views/home-user-settings.vue b/ayanova/src/views/home-user-settings.vue index 5c37b88c..2f895e88 100644 --- a/ayanova/src/views/home-user-settings.vue +++ b/ayanova/src/views/home-user-settings.vue @@ -31,6 +31,23 @@ > + + + + +