【发布时间】:2015-09-24 16:10:10
【问题描述】:
这是我在 openlayers 3.9.0 中的 OSM 层。
var layer = new ol.layer.Tile({
source: new ol.source.OSM(
{
attributions: [
new ol.Attribution({
html: 'All maps © ' +
'<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
})
]
}
),
opacity: 0.8,
brightness: 0.8
});
现在我想获取图层的EPSG code 来检查它,所以我很喜欢
var a = layer.getProjection().getCode();
alert(a);
我收到错误 layer.getProjection is not a function。
我错过了什么?
请帮帮我
【问题讨论】:
标签: openlayers-3