【发布时间】:2015-06-05 22:39:48
【问题描述】:
我正在使用angular-leaflet-directive。是否有更改图层不透明度的选项?
有了“常规”传单,我可以使用layer.setOpacity(0.5)。但是 angular-leaflet-directive 中似乎没有选项。
编辑: 这是我的传单配置:
angular.module('epic-taxi')
.controller('MainController', ['$scope', function($scope) {
$scope.initMap = function() {
angular.extend($scope, {
newYork: {
lat: 40.7304783951045,
lng: -73.98880004882812,
zoom: 12
},
layers: {
baselayers: {
mapbox_light: {
name: 'Light',
type: 'xyz',
url: 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png'
}
},
overlays: {
subway: {
name: 'Subway',
visible: true,
type: 'group',
opacity: 0.1 // not working
}
}
}
});
};
}]);
我想更改包含多条路径的“地铁”叠加层的不透明度。
【问题讨论】:
标签: angularjs leaflet angular-leaflet-directive