Tag: gis

我创建的Google Maps V3 Circle&Circle不匹配

我使用Google Maps V3 API创建了一个圆圈,并尝试制作一个半径相同的标记圈。 问题:我创建的那个是倾斜的,而谷歌地图的那个是一个很好的圆形圈。 什么地方出了错? Google Maps V3 Circle Code // Draw search circle search_circle = new google.maps.Circle; search_circle.setCenter(target_latlng); search_circle.setRadius(travel_time * average_speed); search_circle.setMap(map);

如何在’popupopen`事件中识别Leaflet的标记?

当单击一个标记时,我需要执行一些代码,找到与被点击的标记对应的id ,从后端API检索数据,然后将新检索的数据添加到将打开的弹出窗口的content中。 能够在标记上收听点击事件的唯一方法是 map.on(‘popupopen’, function(e){ // How to retrieve marker? // eg: Assign an id on creation, retrieve it now during popupopen };) 我怎样才能找出这是哪个标记? 是否可以为每个标记添加id属性,然后在popupopen事件期间检索此id ?