diff --git a/examples/leaflet-rotate.html b/examples/leaflet-rotate.html index fa953e4..1ebf767 100644 --- a/examples/leaflet-rotate.html +++ b/examples/leaflet-rotate.html @@ -10,19 +10,14 @@ - - - - - - + - - - - + + + + @@ -63,12 +62,14 @@ maxZoom: 24, maxNativeZoom: 18, attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community', + // noWrap: true }); var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 24, maxNativeZoom: 19, attribution: '© OpenStreetMap contributors', + // noWrap: true }); var map = L.map('map', { @@ -76,17 +77,34 @@ zoom: 2, layers: [esri], // worldCopyJump: true, + // preferCanvas: false, rotate: true, - touchRotate: true, rotateControl: { - closeOnZeroBearing: false + closeOnZeroBearing: false, + // position: 'bottomleft', }, bearing: 30, + // attributionControl: false, + // zoomControl: false, + // compassBearing: false, + // trackContainerMutation: false, + // shiftKeyRotate: false, + // touchGestures: true, + touchRotate: true, + // touchZoom: true }); - // map.setBearing(30); + // map.setBearing(90); // map.touchRotate.enable(); + // map.touchZoom.disable() + // map.compassBearing.disable() + // map.touchGestures.enable() + + // map.zoomControl.setPosition('bottomleft'); + // map.rotateControl.setPosition('bottomleft'); + // map.setMaxBounds([[-90,-180], [90,180]]); + var layers = L.control.layers({ 'Empty': L.tileLayer(''), 'Streets': osm, @@ -125,25 +143,6 @@ // Display some debug info L.Rotate.debug(map); - - var cluster = L.markerClusterGroup({ - spiderfyOnMaxZoom: false, - showCoverageOnHover: false, - zoomToBoundsOnClick: false - }) - .on('clusterclick', (a) => a.layer.spiderfy()) - .addTo(map); - - // populate cluster with random markers - for (var i = 0; i < 100; i++) { - var bounds = map.getBounds(); - var southWest = bounds.getSouthWest(); - var northEast = bounds.getNorthEast(); - var lngSpan = northEast.lng - southWest.lng; - var latSpan = northEast.lat - southWest.lat; - var m = L.marker( L.latLng(southWest.lat + latSpan * Math.random(), southWest.lng + lngSpan * Math.random()) ); - cluster.addLayer(m); - } View on Github - + \ No newline at end of file diff --git a/test/index.html b/test/index.html index 53c4c48..bb96f3a 100644 --- a/test/index.html +++ b/test/index.html @@ -150,4 +150,4 @@ - + \ No newline at end of file