|
|
@@ -62,7 +62,7 @@ define(['jquery', "template", "Tools", "paging", 'dateTime', 'swiper'], function |
|
|
|
projection: projection, |
|
|
|
target: "container", |
|
|
|
view: new ol.View({ |
|
|
|
// center: mapCenterLocation, // 地图中心坐标 |
|
|
|
center: ol.proj.fromLonLat([dept.lng, dept.lat]), // 地图中心坐标 |
|
|
|
zoom: 16, |
|
|
|
minZoom: 1, //地图缩小限制 |
|
|
|
maxZoom: 18, //地图放大限制 |
|
|
@@ -94,8 +94,6 @@ define(['jquery', "template", "Tools", "paging", 'dateTime', 'swiper'], function |
|
|
|
}); |
|
|
|
module.data.map.addLayer(homesteadDetail); |
|
|
|
module.data.map.getView().setCenter(ol.extent.getCenter(homesteadDetail.getSource().getExtent())); |
|
|
|
} else { |
|
|
|
module.data.map.getView().setCenter(ol.proj.fromLonLat([dept.lng, dept.lat])); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|