diff --git a/lib/smk.js b/lib/smk.js
index 11684c2..a69a0c6 100644
--- a/lib/smk.js
+++ b/lib/smk.js
@@ -826,7 +826,7 @@ u.rest=u.tail=u.drop=function(a,b,c){return m.call(a,null==b||c?1:b)},u.compact=
);
include.tag( "viewer-leaflet",
{ loader: "group", tags: [
- { loader: "script", url: "smk/viewer-leaflet/viewer-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/viewer-leaflet.js]" ); include.module("viewer-leaflet",["viewer","leaflet","layer-leaflet","feature-list-leaflet","turf"],function(){"use strict";function e(){SMK.TYPE.Viewer.prototype.constructor.apply(this,arguments)}function t(e){var t=[];return t.push(L.esri.Vector.vectorBasemapLayer(SMK.TYPE.Viewer.prototype.basemap[e].esriStyleName,{detectRetina:!0,pane:'basemaps',apiKey:SMK.CONFIG.viewer.esriApiKey})),this.labels&&this.labels.forEach(function(e){t.push(L.esri.Vector.vectorBasemapLayer(e,{detectRetina:!0,pane:'basemaps',apiKey:SMK.CONFIG.viewer.esriApiKey}))}),t}SMK.TYPE.Viewer||(SMK.TYPE.Viewer={}),SMK.TYPE.Viewer.leaflet=e,$.extend(e.prototype,SMK.TYPE.Viewer.prototype),e.prototype.initialize=function(e){var t=this;SMK.TYPE.Viewer.prototype.initialize.apply(this,arguments),this.deadViewerLayer={};var a=e.addToContainer('
');if(t.map=L.map(a,{dragging:!1,zoomControl:!1,boxZoom:!1,doubleClickZoom:!1,zoomSnap:0, minZoom:1, maxZoom:18}),t.map.createPane('basemaps'),t.map.getPane('basemaps').style.zIndex=100,t.map.scrollWheelZoom.disable(),e.viewer.location.extent){var o=e.viewer.location.extent;t.map.fitBounds([[o[1],o[0]],[o[3],o[2]]],{animate:!1,duration:0,paddingTopLeft:o[4],paddingBottomRight:o[5]})}e.viewer.location.zoom&&t.map.setZoom(e.viewer.location.zoom,{animate:!1}),e.viewer.location.center&&t.map.panTo([e.viewer.location.center[1],e.viewer.location.center[0]],{animate:!1}),e.viewer.baseMap&&t.setBasemap(e.viewer.baseMap),this.changedViewDebounced=SMK.UTIL.makeDelayedCall(function(){t.changedView()},{delay:1e3}),t.map.on("zoomstart",this.changedViewDebounced),t.map.on("movestart",this.changedViewDebounced),t.map.on("zoomend",this.changedViewDebounced),t.map.on("moveend",this.changedViewDebounced),this.changedViewDebounced(),t.finishedLoading(function(){t.map.eachLayer(function(e){e._smk_id&&t.deadViewerLayer[e._smk_id]&&(t.map.removeLayer(e),delete t.visibleLayer[e._smk_id])}),Object.keys(t.deadViewerLayer).forEach(function(e){delete t.deadViewerLayer[e],delete t.visibleLayer[e]})}),t.map.on("click",function(e){t.pickedLocation({map:{latitude:e.latlng.lat,longitude:e.latlng.lng},screen:e.containerPoint})}),t.map.on("mousemove",function(e){t.changedLocation({map:{latitude:e.latlng.lat,longitude:e.latlng.lng},screen:e.containerPoint})}),t.getVar=function(){return e.getVar.apply(e,arguments)}},e.prototype.getScale=function(){var e=this.map.getSize().y/2;return this.map.distance(this.map.containerPointToLatLng([0,e]),this.map.containerPointToLatLng([100,e]))/this.screenpixelsToMeters},e.prototype.getView=function(){var e=this.map.getBounds(),t=this.map.getSize(),a=this.map.getCenter(),o=t.y/2,i=this.map.distance(this.map.containerPointToLatLng([0,o]),this.map.containerPointToLatLng([100,o]));return{center:{latitude:a.lat,longitude:a.lng},zoom:this.map.getZoom(),extent:[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()],scale:i/this.screenpixelsToMeters,metersPerPixel:i/100,screen:{width:t.x,height:t.y}}},e.prototype.screenToMap=function(e){var t;return[(t=Array.isArray(e)?this.map.containerPointToLatLng(e):this.map.containerPointToLatLng([e.x,e.y])).lng,t.lat]},e.prototype.basemap.Topographic.create=t,e.prototype.basemap.Streets.create=t,e.prototype.basemap.Imagery.create=t,e.prototype.basemap.DarkGray.create=t,e.prototype.basemap.Gray.create=t,e.prototype.basemap.StamenTonerLight.create=function(e){return[L.tileLayer(this.url,{attribution:this.attribution,pane:'basemaps'})]},e.prototype.basemap.StamenTonerLight.url="https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",e.prototype.basemap.StamenTonerLight.attribution="Map tiles by
Stamen Design, under
CC BY 3.0. Data by
OpenStreetMap, under
ODbL.",e.prototype.setBasemap=function(e){var t=this;this.currentBasemap&&this.currentBasemap.forEach(function(e){t.map.removeLayer(e)}),this.currentBasemap=this.createBasemapLayer(e),this.map.addLayer(this.currentBasemap[0]);for(var a=1;a
Math.max(r,n)?i');if(t.map=L.map(a,{dragging:!1,zoomControl:!1,boxZoom:!1,doubleClickZoom:!1,zoomSnap:0}),t.map.createPane('basemaps'),t.map.getPane('basemaps').style.zIndex=100,t.map.scrollWheelZoom.disable(),e.viewer.location.extent){var o=e.viewer.location.extent;t.map.fitBounds([[o[1],o[0]],[o[3],o[2]]],{animate:!1,duration:0,paddingTopLeft:o[4],paddingBottomRight:o[5]})}e.viewer.location.zoom&&t.map.setZoom(e.viewer.location.zoom,{animate:!1}),e.viewer.location.center&&t.map.panTo([e.viewer.location.center[1],e.viewer.location.center[0]],{animate:!1}),e.viewer.baseMap&&t.setBasemap(e.viewer.baseMap),this.changedViewDebounced=SMK.UTIL.makeDelayedCall(function(){t.changedView()},{delay:1e3}),t.map.on("zoomstart",this.changedViewDebounced),t.map.on("movestart",this.changedViewDebounced),t.map.on("zoomend",this.changedViewDebounced),t.map.on("moveend",this.changedViewDebounced),this.changedViewDebounced(),t.finishedLoading(function(){t.map.eachLayer(function(e){e._smk_id&&t.deadViewerLayer[e._smk_id]&&(t.map.removeLayer(e),delete t.visibleLayer[e._smk_id])}),Object.keys(t.deadViewerLayer).forEach(function(e){delete t.deadViewerLayer[e],delete t.visibleLayer[e]})}),t.map.on("click",function(e){t.pickedLocation({map:{latitude:e.latlng.lat,longitude:e.latlng.lng},screen:e.containerPoint})}),t.map.on("mousemove",function(e){t.changedLocation({map:{latitude:e.latlng.lat,longitude:e.latlng.lng},screen:e.containerPoint})}),t.getVar=function(){return e.getVar.apply(e,arguments)}},e.prototype.getScale=function(){var e=this.map.getSize().y/2;return this.map.distance(this.map.containerPointToLatLng([0,e]),this.map.containerPointToLatLng([100,e]))/this.screenpixelsToMeters},e.prototype.getView=function(){var e=this.map.getBounds(),t=this.map.getSize(),a=this.map.getCenter(),o=t.y/2,i=this.map.distance(this.map.containerPointToLatLng([0,o]),this.map.containerPointToLatLng([100,o]));return{center:{latitude:a.lat,longitude:a.lng},zoom:this.map.getZoom(),extent:[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()],scale:i/this.screenpixelsToMeters,metersPerPixel:i/100,screen:{width:t.x,height:t.y}}},e.prototype.screenToMap=function(e){var t;return[(t=Array.isArray(e)?this.map.containerPointToLatLng(e):this.map.containerPointToLatLng([e.x,e.y])).lng,t.lat]},e.prototype.basemap.Topographic.create=t,e.prototype.basemap.Streets.create=t,e.prototype.basemap.Imagery.create=t,e.prototype.basemap.DarkGray.create=t,e.prototype.basemap.Gray.create=t,e.prototype.basemap.StamenTonerLight.create=function(e){return[L.tileLayer(this.url,{attribution:this.attribution,pane:'basemaps'})]},e.prototype.basemap.StamenTonerLight.url="https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",e.prototype.basemap.StamenTonerLight.attribution="Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.",e.prototype.setBasemap=function(e){var t=this;this.currentBasemap&&this.currentBasemap.forEach(function(e){t.map.removeLayer(e)}),this.currentBasemap=this.createBasemapLayer(e),this.map.addLayer(this.currentBasemap[0]);for(var a=1;aMath.max(r,n)?i