【发布时间】:2016-11-17 10:54:26
【问题描述】:
我正在为我的项目使用 Openlayers 指令。 我能够在地图上绘制几何图形,现在我想放大它。
我看到了这个example,这正是我想做的(最合适的部分)。 但我不知道如何使用 Angular Directive。
这是我的组件控制器中的层:
_this.perimeterLayer = {
source: {
type: 'GeoJSON',
geojson: {
object: {
type: 'Feature',
geometry: {
type: 'Polygon',
coordinates: transformedCoords
}
}
}
},
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'blue',
width: 3
}),
fill: new ol.style.Fill({
color: 'rgba(0, 0, 255, 0.1)'
})
})
};
以及我在我看来如何使用它:
<ol-layer ol-layer-properties="$ctrl.perimeterLayer"></ol-layer>
你能帮帮我吗?
非常感谢!
【问题讨论】:
标签: javascript angularjs openlayers-3 directive