谁知道为什么地图显示为倾斜而不是顶视图?我在地图上使用带有WMS的arcgis js。在体内,您需要放置一个div:
<div id="viewDiv"></div>
这是我的js代码:
var map, view, layer;
require([
"esri/tasks/Locator",
"esri/Map",
"esri/views/MapView",
"esri/layers/WMSLayer"
], function (Locator, Map, MapView, WMSLayer) {
layer = new WMSLayer({
url: 'https://geoservices.informatievlaanderen.be/raadpleegdiensten/GRB-basiskaart/wms'
});
var locatorTask = new Locator({
url:
"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"
});
map = new Map({
basemap: {
baseLayers: [layer]
}
});
view = new MapView({
map: map,
container: "viewDiv",
constraints: {
rotationEnabled: false
}
});
});