|
@@ -34,9 +34,9 @@
|
|
|
},
|
|
|
initMap(){
|
|
|
const map = L.map('map', {
|
|
|
- minZoom: 0.5,
|
|
|
+ minZoom: 1,
|
|
|
maxZoom: 3,
|
|
|
- center: [30, 50],
|
|
|
+ center: [0, 0],
|
|
|
zoom: 1,
|
|
|
crs: L.CRS.Simple
|
|
|
});
|
|
@@ -50,10 +50,10 @@
|
|
|
}
|
|
|
return yx(y, x)
|
|
|
}
|
|
|
- var bounds = [xy(-330, -255), xy(330, 255)]
|
|
|
+ var bounds = [xy(-264, -204), xy(264, 204)]
|
|
|
/**添加图层 */
|
|
|
L.imageOverlay(mapUrl, bounds).addTo(map);
|
|
|
- map.setMaxBounds(bounds);
|
|
|
+ map.fitBounds(bounds)
|
|
|
this.map=map
|
|
|
},
|
|
|
getLayers(callback){
|