我有一个URL,其中包含arcgis rest服务以获取功能。我对Arcgis不知道如何使用Geoserver,打开第3层来实现该服务/ URL。
var attribution = new ol.Attribution({
html: 'Tiles © <a href="http://tracgis.telangana.gov.in/arcgis/rest/services/TSIIC/Industrial_Infrastructure_Layers/MapServer/">ArcGIS</a>'
});
var wmsSourceforInfo1 = new ol.source.TileArcGISRest({
url : 'http://tracgis.telangana.gov.in/arcgis/rest/services/TSIIC/Industrial_Infrastructure_Layers/MapServer/',
attributions: [attribution],
serverType : 'geoserver',
//param:{'LAYERS' : "0"},
crossOrigin : 'anonymous'
});
var url = wmsSourceforInfo2.getGetFeatureInfoUrl(evt.coordinate,
viewResolution, 'EPSG:3857', {
'INFO_FORMAT' : 'application/json',
'BUFFER' : 10
});
alert(url);
$.get(url, function(response) {
console.log(response);
var res = JSON.parse(response);
alert("data" + res );
});