在地图上添加文字图层

// var osmUrl = "../assets/image/riskmap-logo-166x40-2.png";//这里的asdf也可以替换成图片
var osm = new L.TileLayer("asdf", {  zoom: 3,minZoom: 3, maxZoom:18 });
this.map.addLayer(osm);
this.map.setView(new L.LatLng(34, 127),1);
var myIcon24 = L.divIcon({
    html: "

24

"+ "

"+ "

"+ "

"+ "

"+ "

线

", className: 'my-div-icon', iconSize:5, }); var myIcon48 = L.divIcon({ html: "

48

"+ "

"+ "

"+ "

"+ "

"+ "

线

", color:'red', className: 'my-div-icon', iconSize:5 }); L.marker([34, 127],{icon:myIcon24}).addTo(this.map); L.marker([30, 132],{icon:myIcon48}).addTo(this.map);

//-webkit-transform:rotate(90deg);把文字旋转90度

在地图上添加文字图层_第1张图片

 

你可能感兴趣的:(iserver,iobject,idesktop)