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

Kyl*_*ell 5 leaflet angular-leaflet-directive

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

抵消问题

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;
                    }
                }

            });
Run Code Online (Sandbox Code Playgroud)

如何更改标记的偏移量?

vit*_*_74 7

使用popupAnchor: [-10, -10],L.Icon.见http://leafletjs.com/reference.html#icon