This commit is contained in:
2020-11-12 23:25:32 +00:00
parent 0084036334
commit 810a89ec46
4 changed files with 46 additions and 0 deletions

View File

@@ -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!?

View File

@@ -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"

View File

@@ -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
});

View File

@@ -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}"
}
]
},