shuishen
2021-11-17 4307f8d35b14f54011130a858a7c9dcebb9bd197
map修改
1 files modified
4 files added
44 ■■■■■ changed files
public/img/mapicon/car.png patch | view | raw | blame | history
public/img/mapicon/gun.png patch | view | raw | blame | history
public/img/mapicon/people.png patch | view | raw | blame | history
public/img/mapicon/start.png patch | view | raw | blame | history
src/components/map/main.vue 44 ●●●●● patch | view | raw | blame | history
public/img/mapicon/car.png
public/img/mapicon/gun.png
public/img/mapicon/people.png
public/img/mapicon/start.png
src/components/map/main.vue
@@ -94,49 +94,7 @@
    },
    mounted () {
        //建立地图
        this.createmap(2); //1为本地
        // 正式服务器上使用
        this.ol2d = new OlMap({
            layers: [
                new OlLayerTile({//矢量地图
                    source: new WMTS({
                        url: "http://47.49.21.207:7001/PGIS_S_TileMapServer/Maps/YX",
                        layer: "JX14YGJCIMGL7_L14",
                        style: "default",
                        matrixSet: "JX14YGJCIMGL7_L14",
                        format: "image/png",
                        wrapX: true,
                        tileGrid: new WMTSTileGrid({
                            origin: getTopLeft(projectionExtent),
                            //resolutions: res.slice(0, 15),
                            resolutions: resolutions,
                            matrixIds: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
                        })
                    }),
                })
            ],
            // 注意地图控件的写法
            controls: defaults().extend([
                new FullScreen(),
                new ScaleLine(),
                // new MousePosition(),
                new Rotate(),
                new Attribution()
            ]),
            target: 'track_map',
            view: new OlView({
                center: [115.85883507433789, 28.708432053474827],
                projection: projection,
                zoom: 11,
                maxZoom: 15,
                minZoom: 1
            })
        })
        this.createmap(1); //1为本地
        this.parentParameter();