我正在使用ArcGIS jsapi。它适用于ArcGIS MapServers,但我想添加QGIS图层。 我试图使用WmsLayer:
var map = new EsriMap("cgis-map", {
logo: false,
slider: false,
lods: this._buildLods()
});
map.addLayers(this._buildLayers());
var wmsLayerInfo = new WMSLayerInfo({ name: "country", title: "QGIS Layer" });
var resourceInfo = {
extent: extent,
layerInfos: [wmsLayerInfo]
};
var wmsLayer = new WMSLayer("http://mrdata.usgs.gov/services/country", {
resourceInfo: resourceInfo,
format: "PNG24",
transparent: true,
version: "1.1.1",
visibleLayers: ["country"]
});
map.addLayer(wmsLayer);
但它不起作用。 我怎么能解决这个问题?
答案 0 :(得分:0)
您需要为resourceInfo提供所有必需的属性。以下是所有属性的列表。您缺少 getMapURL
String copyright
String description
Extent extent Required
String featureInfoFormat
String getFeatureInfoURL
String getMapURL Required
WMSLayerInfo layerInfos Required
Number maxHeight
Number maxScale
Number maxWidth
Number minScale
String title
String version