管灌系统巡查员智能手机App
zuoxiao
2024-10-21 c9f622302bbc5a9a30cff341200334c3dd23ffe0
app/src/main/assets/js/map.js
@@ -134,21 +134,21 @@
    // 手机获取到定位后显示定位
    function locationOverLay(lng, lag) {
        console.log("function》》》》》locationOverLay");
        map.centerAndZoom(new T.LngLat(lng, lag), 18);
        map.centerAndZoom(new T.LngLat(lng, lag), map.getZoom());
        let icon = new T.Icon({
            iconUrl: locationIMGPath,
            iconSize: new T.Point(27, 27),
            iconAnchor: new T.Point(10, 25)
        });
        let marker = new T.Marker(new T.LngLat(lng, lag), { icon: icon });
        map.addOverLay(marker);
    }
    //设置地图中心点
    function setCenterAndZoom(lng, lat) {
    function setCenterAndZoom(lng, lat,thiszoom) {
    zoom=thiszoom;
        console.log("function》》》》》setCenterAndZoom>>>>lng:" + lng + ",lat:" + lat);
        map.centerAndZoom(new T.LngLat(lng, lat), zoom);
    }