Skip to content

Commit

Permalink
[example]修改leaflet海图示例点选查询处理点击坐标的逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxianhuii committed Oct 28, 2024
1 parent a49adf6 commit bbc7c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/leaflet/01_chartService.html
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ <h5 class='panel-title text-center'>
function clickHandler(event) {
var coordinate = event.latlng;
var pixelCoor = event.layerPoint;
var b1 = map.containerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
var b2 = map.containerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
var b1 = map.layerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
var b2 = map.layerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
// 添加点要素
pointResultLayer && map.removeLayer(pointResultLayer);
pointResultLayer = L.circleMarker(coordinate,{radius:5});
Expand Down

0 comments on commit bbc7c17

Please sign in to comment.