openlayers 中设置的图片图层,为什么在地图层级小于9的时候,才能显示出图片,大于9 就不显示了??
const addImg = () => {
const extent = [116.75199, 36.55358, 116.95199, 36.15358];
const projection = new Projection({
code: "EPSG:4326",
extent
});
const image = new ImageStatic({
url: "https://imgs.xkcd.com/comics/online_communities.png",
projection,
imageExtent: extent
});
imageLayer.value = new ImageLayer({
source: image
});
map.value.addLayer(imageLayer.value);
};
地图设置
const mapView = reactive({
center: fromLonLat([
noFlySceneData[0].centerLng,
noFlySceneData[0].centerLat
]),
zoom: 10,
minZoom: 4,
maxZoom: 18
});
希望不管zoom多少,都能显示图片
希望不管zoom为多少,都能显示图片