在组件中:
var url="http://localhost:8090/iserver/services/map-mapdata-2/rest/maps/province_1_1@map";
var vectorLayer = new L.supermap.TileVectorLayer(url, { cacheEnabled: true, returnAttributes: true }).addTo(map);
地图加载不出来,是发布的数据的问题吗
var url = ' http://localhost:8090/iserver/services/map-mapdata-2/rest/maps/province_1_1@map'
// 初始化地图信息
var map = L.map('map', {
crs: L.CRS.EPSG3857,
center: [38 , 118],
maxZoom: 18,
zoom: 3
});
new L.supermap.TiledMapLayer(url).addTo(map);
同样的数据,在html写是可以加载的,在组件中就不出来