【发布时间】:2019-03-13 20:26:35
【问题描述】:
我正在将代码从 OpenLayers 3 移动到 OpenLayers 4(打字稿)
我有这段代码可以扩展我的范围,以便在加载地图时我绘制的所有矢量形状都可见...
angular.forEach(webMapValues.vectorFieldLayer, function (Field, key)
{
webMapValues.mapObj.addLayer(Field);
webMapValues.extent = Field.getSource().getExtent();
webMapValues.totalExtent = ol.extent.extend(webMapValues.extent,
webMapValues.totalExtent);
})
在上面的“ol.extent.extend”中为我表演了魔法,而在 OpenLayers 4(打字稿)中我找不到等效的?
非常感谢任何帮助!
【问题讨论】:
标签: angular typescript openlayers openlayers-3 openlayers-5