import L from "leaflet";
import "@supermap/iclient-leaflet";
var iserverUrl = this.getIserver;
var map = L.map("map", {
center: [31.2363429624, 121.4803295328],
zoom: 3,
crs: L.CRS.EPSG4326,
zoomControl:false ,
attributionControl: false
});
L.control.zoom({zoomInTitle:'放大',zoomOutTitle:'缩小'}).addTo(map);
L.control.layers().addTo(map);
L.supermap.tiledMapLayer(iserverUrl).addTo(map);
var markers = L.marker([36.52,120.31]).addTo(map);
markers.on("click",function(e){
console.log(e)
alert("我被点击了");
})
在地图上添加marker没有显示标记,但是这个标记是存在的,只是我看不到,不知道什么原因??