问题描述:leaflet加载iserver发布的地图显示不完整
代码如下
<template>
  <div class="supMap-box">
    <div id="map" :style="{ height: mapHeight + 'px' }">
    </div>
  </div>
</template>
<script>
import L from 'leaflet';
import {TiledMapLayer} from '@supermap/iclient-leaflet';
export default {
  name: "Index",
  data() {
    return {
      mapHeight: 900,
      map: null,
    };
  },
  created() {   
  },
  mounted() {
    this.initMap()
  },
  methods: {
    initMap() {
      var supermapurl = 'http://localhost:8090/iserver/services/map-HanJiangLiuYuDiTu-2/rest/maps/%E6%B1%89%E6%B1%9F%E6%B5%81%E5%9F%9F'
      this.map = L.map('map', {
        crs: L.CRS.EPSG4326,
        center: [32, 111],
        maxZoom: 18,
        zoom: 6
      });
      new TiledMapLayer(supermapurl).addTo(this.map);
    }
  }
}
</script>
<style scoped>
#map {
  width: 1900px;
  height: 1400px;
}
</style>
