Skip to content

Commit bbc7c17

Browse files
committed
[example]修改leaflet海图示例点选查询处理点击坐标的逻辑
1 parent a49adf6 commit bbc7c17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/leaflet/01_chartService.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ <h5 class='panel-title text-center'>
486486
function clickHandler(event) {
487487
var coordinate = event.latlng;
488488
var pixelCoor = event.layerPoint;
489-
var b1 = map.containerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
490-
var b2 = map.containerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
489+
var b1 = map.layerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
490+
var b2 = map.layerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
491491
// 添加点要素
492492
pointResultLayer && map.removeLayer(pointResultLayer);
493493
pointResultLayer = L.circleMarker(coordinate,{radius:5});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy