瑙e喅 OpenLayers 鍒濆鍖栧湴鍥捐创鐗囪鎷変几闂

Bing馃悾VueWebOpenLayersVue鍦板浘楂樺痉鍦板浘澶х害 1 鍒嗛挓

瑙e喅 OpenLayers 鍒濆鍖栧湴鍥捐创鐗囪鎷変几闂

OpenLayers 鍦板浘鍔犺浇楂樺痉鍦板浘鏁版嵁鐨勬椂鍊欙紝鍦ㄥ垵濮嬪寲鐨勬椂鍊欏湴鍥捐创鐗囪鎷変几锛 涓嬪浘鍙互寰堟槑鏄剧殑鐪嬪埌搴曞浘琚媺浼镐簡锛屽彲浠ラ厤鍚堥珮寰峰姞杞界殑鍧楀浘鐗囨瘮杈冧笅銆

http://wprd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x=1711&y=831&z=11open in new window

image
image
image
image

涓嬪浘涓鸿皟鏁寸獥鍙e悗鑷姩鏇存柊浜嗗湴鍥剧殑搴曞浘灏哄锛屽彉鎴愭甯哥殑锛屽彲浠ュ拰涓婇潰鐨勬瘮杈冧笅

image
image

鍒濆鍖栫殑鏃跺欏簳鍥捐鎷変几鍙樺舰锛屽鑷寸粯鍥剧殑鐐圭殑浣嶇疆涓嶆纭紝濡備笅闈㈢殑鍔ㄥ浘鎵绀恒

1566195584967-5cda7db7-a0e8-427f-8686-3e291f92fdf1
1566195584967-5cda7db7-a0e8-427f-8686-3e291f92fdf1

瑙e喅鏂规硶

閫氳繃鏌ラ槄鏂囨。锛屽緱鐭Map涓嬮潰鏈変釜updateSize鏂规硶鐢ㄤ簬寮哄埗閲嶆柊璁$畻鍦板浘澶у皬 鎵浠ュ湪鍦板浘鍒濆鍖栫殑鍙互寮傛璋冪敤涓嬭繖涓柟娉曞嵆鍙細

this.GDMap = new Map({
  target: 'GDMap',
  layers: [
    new TileLayer({
      source: new XYZ({
        url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}'
      })
    }),
    this.vector
  ],
  view: new View({
    projection: 'EPSG:4326',
    center: [120.864608, 32.016212],
    zoom: 11,
    minZoom: 5,
    maxZoom: 20
  })
})
setTimeout(() => {
  this.GDMap.updateSize()
}, 20)
璇勮
  • 鎸夋搴
  • 鎸夊掑簭
  • 鎸夌儹搴
Powered by Waline v2.15.5