s.queryByGeometry(pa,function(re:any){
let style=L.icon({
iconUrl:'@/assets/vue.svg', // 自定义图标路径
iconSize: [32, 32], // 图标大小
iconAnchor: [16, 16] // 图标锚点
})
let resultLayer1 = L.geoJSON(re.result.recordsets[0].features,{pointToLayer:
function(geoJsonPoint:any, latlng:any) {
return L.marker(latlng,{ icon:style });
}
}).addTo(map.value);
leaflet GeoJSON图层自定义点样式
最新推荐文章于 2024-09-11 00:06:23 发布