function layerService() {
L.supermap
.layerInfoService(url,{
proxy: "http://localhost:8090/GettingStart/httpproxy/httpproxy.jsp?url=http://222.84.136.150:8081/geoesb/proxy/f6b3c78a553843919b45ca9d0be09cc2/886e60bb7e014f22a707de23e6f6505d",
crossOrigin: true,
})
.getLayersInfo(function (serviceResult) {
var result = serviceResult.result;
var innerHTML = "";
result.subLayers.layers.map(function (layer) {
innerHTML += layer.name + "<br>";
});
infowin = L.popup({maxWidth: 400})
.setLatLng(map.getCenter())
.setContent(innerHTML)
.openOn(map);
});
}
量距量面.html:82 Uncaught (in promise) TypeError: Cannot read property 'subLayers' of undefined
at Bs.<anonymous> (量距量面.html:82)
at Ie.triggerEvent (iclient-leaflet-es6.min.js:101)
at Bs.serviceProcessFailed (iclient-leaflet-es6.min.js:218)
at Bs.getUrlFailed (iclient-leaflet-es6.min.js:218)
at iclient-leaflet-es6.min.js:28
at iclient-leaflet-es6.min.js:218
这个错误怎么解决 代码在iserver10上运行的