layen 我自己项目上也在用,使用很简单,view的projection要设置为EPSG:4326
var third_party_img = new ol.layer.Amap({
type: "img",
label: true,
opacity: 1
});
var third_party_vec = new ol.layer.Amap({
type: "vec",
label: true,
opacity: 1
});
var map = new ol.Map({
target: 'map',
layers: [
third_party_img,
third_party_vec
],
overlays: [popupOverlay, menuOverlay],
view: new ol.View({
center: [118.12743176434324, 24.48919116212222],
projection: “EPSG:4326”,
zoom: 10,
minZoom: 8,
maxZoom: 18
}),
controls: ol.control.defaults({
zoom: false,
rotate: false,
attribution: false
})
});