diff --git a/www/assets/js/MapControl.class.js b/www/assets/js/MapControl.class.js
index eabbfce..c79ab6d 100644
--- a/www/assets/js/MapControl.class.js
+++ b/www/assets/js/MapControl.class.js
@@ -31,12 +31,20 @@ class MapControl {
* @param {number} latitude
* @param {number} longitude
* @param {boolean} accurate set true to zoom to street level (z13), false to zoom to general area (z10).
+ * @param {boolean} countrylevel set true to override accurate and set zoom level to z4
* @returns {undefined}
*/
- clearMarkersAndCenterMapOnNewMarker(classname, latitude, longitude, accurate) {
+ clearMarkersAndCenterMapOnNewMarker(classname, latitude, longitude, accurate, countrylevel) {
this.mapObj.removeMarkers();
this.mapObj.addMarker(latitude, longitude, classname);
- this.mapObj.animateMapIn(latitude, longitude, (accurate ? 13 : 10));
+ var zoomlevel = 10;
+ if (accurate) {
+ zoomlevel = 13;
+ }
+ if (countrylevel) {
+ zoomlevel = 4;
+ }
+ this.mapObj.animateMapIn(latitude, longitude, zoomlevel);
}
loadMarkersFromGeoJson(geojson, iconname, name) {
diff --git a/www/assets/js/track.js b/www/assets/js/track.js
index 677b150..dce2a13 100644
--- a/www/assets/js/track.js
+++ b/www/assets/js/track.js
@@ -193,7 +193,8 @@ function trackOpenAsync( {to, resolve, reject}) {
enabled: (typeof resp.info.latitude == "number" && typeof resp.info.longitude == "number" && MapControl.supported()),
latitude: resp.info.latitude,
longitude: resp.info.longitude,
- accurate: resp.info.geoaccurate
+ accurate: resp.info.geoaccurate,
+ geoiscountrylevel: (typeof resp.info.geoiscountrylevel == "undefined" ? false : resp.info.geoiscountrylevel)
}
};
if (resp.info.statustext) {
diff --git a/www/index.html b/www/index.html
index 3508940..4e3957a 100644
--- a/www/index.html
+++ b/www/index.html
@@ -44,7 +44,7 @@
-
+
@@ -72,6 +72,7 @@
+
diff --git a/www/pages/trackresult.html b/www/pages/trackresult.html
index 79273ba..147b695 100644
--- a/www/pages/trackresult.html
+++ b/www/pages/trackresult.html
@@ -30,7 +30,7 @@
{{#if map.enabled}}
{{/if}}
diff --git a/www/routes.js b/www/routes.js
index a144e99..26404a0 100644
--- a/www/routes.js
+++ b/www/routes.js
@@ -23,6 +23,7 @@ var pagesToCompile = [
"shop",
"shoppingcart_fragment",
"rateresult",
+// "labelrateresult",
"crypto",
"crypto_wallet",
"account",
@@ -205,11 +206,17 @@ var routes = [
resolve({
content: compiledPages.send({
pages: [
+// {
+// title: "From My Phone",
+// href: "/labelmaker",
+// icon: "fa-duotone fa-mobile-alt",
+// text: "Send USPS Flat Rate packages from your phone. Printer optional."
+// },
{
- title: "Use a Drop Box",
+ title: "From a Drop Box",
href: "/dropandsend",
icon: "fa-duotone fa-box-alt",
- text: "Bring your package to a Drop and Send location and we'll ship it for you. No postage or appointment needed."
+ text: "Bring your package to a Drop and Send drop box or kiosk and we'll ship it for you. No postage or appointment needed."
},
{
title: "Request a Pickup",
@@ -224,7 +231,7 @@ var routes = [
text: "Our Mobile Shipping Center roams the Helena area like a food truck for mail. Find dates and places here."
},
{
- title: "Book an Appointment",
+ title: "By Appointment",
href: "/appointment/shipping",
icon: "fa-duotone fa-calendar-alt",
text: "A courier will come to you on your schedule. No account required."
@@ -307,7 +314,7 @@ var routes = [
}
}
},
- {
+ {
path: '/quicksend',
content: compiledPages.address_qrcode(),
name: 'quicksend'
@@ -512,6 +519,25 @@ var routes = [
}
}
},
+// {
+// path: '/labelmaker',
+// url: './pages/labelmaker.html',
+// name: 'labelmaker',
+// on: {
+// pageBeforeIn: function () {
+// checkIfAccountGoodWithPaymentMethod(function (ok) {
+// if (!ok) {
+// $("#addPaymentMethodNag").css("display", "");
+// }
+// }, function (error) {
+// $("#addPaymentMethodNag").css("display", "");
+// });
+// },
+// pageAfterIn: function () {
+// initLabelMakerForm();
+// }
+// }
+// },
{
path: '/account',
name: 'account',
@@ -534,7 +560,8 @@ var routes = [
var latitude = $(mapboxel).data("latitude");
var longitude = $(mapboxel).data("longitude");
var accurate = $(mapboxel).data("accurate") == true;
- trackingMap.clearMarkersAndCenterMapOnNewMarker("package-marker", latitude, longitude, accurate);
+ var geoiscountrylevel = $(mapboxel).data("geoiscountrylevel") == true;
+ trackingMap.clearMarkersAndCenterMapOnNewMarker("package-marker", latitude, longitude, accurate, geoiscountrylevel);
}
}
},