gpt4 book ai didi

leaflet - 如何使用角度传单指令和 geojson 更改传单弹出窗口的偏移量?

转载 作者:行者123 更新时间:2023-12-02 21:03:39 25 4
gpt4 key购买 nike

我正在使用 angular-leaflet-directive 和 geojson 来使用 leaflet 和 mapbox 创建 map 标记。标记上的弹出窗口未在标记上正确对齐。

offset problem

angular.extend($scope, { // Map data
geojson: {
data: $scope.filteredShows,
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.artist + ' · ' + feature.properties.venue);
layer.setIcon(defaultMarker);
layer.on({
mouseover: pointMouseover,
mouseout: pointMouseout
});
layers[feature.properties.id] = layer;
}
}

});

如何更改标记上的偏移量?

最佳答案

L.Icon中使用popupAnchor: [-10, -10],。请参阅http://leafletjs.com/reference.html#icon

关于leaflet - 如何使用角度传单指令和 geojson 更改传单弹出窗口的偏移量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28868974/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com