【发布时间】:2016-02-11 17:57:34
【问题描述】:
我正在使用 leaflet.awesome-markers 卡片标记。当您更改图标的颜色时,它会立即关闭弹出消息。
是否可以在不关闭弹窗的情况下更改颜色?
$scope.$on('leafletDirectiveMarker.viewMap.click', function(e, args){
$scope.selectedPoint = $scope.points.filter( function(spoint){ return spoint._id === args.modelName; })[0];
$scope.waypoints[$scope.selectedPoint._id].icon.markerColor = 'green';
});
【问题讨论】:
-
你能做个小提琴吗?
-
即使在示例tombatossals.github.io/angular-leaflet-directive/examples/…中也可以观察到这一点
-
如果你做一个 e.preventDefault();在 $scope.selectedPoint 之前?
-
也应用此决定 (e.preventDefault();) 并无济于事。但问题不在此事件中 - 在不更改标记的情况下无法观察到问题。
标签: angularjs leaflet angular-leaflet-directive