WMSLayer
约 76 字小于 1 分钟
简单示例
import Map from "@arcgis/core/Map"
import MapView from "@arcgis/core/views/MapView"
import WMSLayer from "@arcgis/core/layers/WMSLayer"
const map = new Map({
basemap: 'dark-gray',
})
const mapView = new MapView({
map,
container: 'js_map',
center: [102.92934063304513, 25.102234987110343],
zoom: 3,
})
const wmsLayer = new WMSLayer({
url: "https://geo.weather.gc.ca/geomet"
})
map.layers.add(wmsLayer)
结合图层URL服务
new WMSLayer({
url: `https://xxx.com/geoserver/xxx/wms`,
imageFormat: 'image/png',
sublayers: [{
name: `xxx:vector`
}]
})