UNPKG

dolphin-leaflet

Version:

leaflet for dmap

3 lines 1.33 kB
/*! version:1.1.6 */ webpackJsonp([0],{41:function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),n.d(o,"Coordinates",function(){return s}),n.d(o,"HawkeyeMap",function(){return u});var t=L,i=t.Control,r=t.TileLayer,a=t.Map,d=T,c=d.assign,s=i.extend({options:{position:"bottomleft"},onAdd:function(e){var o=T.create("span"),n=function(e){o.innerText="坐标:"+e.lng.toFixed(4)+", "+e.lat.toFixed(4)};return n(e.getCenter()),e.on("mousemove",function(e){n(e.latlng)}),o}}),u=i.extend({options:{position:"topright"},onAdd:function(e){var o=this,n=T.div();return T(n).setStyle({position:"relative",width:"200px",height:"200px",border:"2px solid #3D6DCC",borderRadius:"100px"}),T.defer(function(){o.createHawkeyeMap(n)}),n},createHawkeyeMap:function(e,o){var n=this._map,t=new a(e,c({},n.options,{attributionControl:!1,zoomControl:!1,scrollWheelZoom:!1}));t.touchZoom.disable(),t.doubleClickZoom.disable(),t.scrollWheelZoom.disable();var i=function(e){t.setView(n.getCenter(),n.getZoom()-2)},d=function(e){e&&t.eachLayer(function(e){t.removeLayer(e)}),n.eachLayer(function(e){e instanceof r&&new r(e._url,c({},e.options)).addTo(t)})};return d(),n.whenReady(i),n.on("move",i),t.on("dragend",function(){n.panTo(t.getCenter(),{animate:!1})}),T.vm.map.on("provider-change",d),t}})}}); //# sourceMappingURL=widgets.js.map