Skip to content

Commit de815f9

Browse files
[fix]iPortalService例子报错 review by songym
1 parent c68ea32 commit de815f9

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

examples/leaflet/iPortalSecurity.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
322322
}
323323
L.supermap.SecurityManager.destroyToken(serviceUrl);
324324
L.supermap.SecurityManager.registerToken(serviceUrl, key);
325-
var iPortalService = new L.supermap.iPortalService(serviceUrl);
326-
iPortalService.load().then(function (json) {
327-
if (json && json.error) {
328-
widgets.alert.showAlert(JSON.stringify(json.error), false);
329-
} else {
330-
widgets.alert.showAlert("proxiedUrl:" + iPortalService.proxiedUrl, true);
331-
}
332-
333-
});
325+
requestService(serviceUrl);
334326
}
335327

336328
function getPortalTokenServiceUrl() {

examples/openlayers/iPortalSecurity.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
319319
}
320320
ol.supermap.SecurityManager.destroyToken(serviceUrl);
321321
ol.supermap.SecurityManager.registerToken(serviceUrl, key);
322-
var iPortalService = new ol.supermap.iPortalService(serviceUrl);
323-
iPortalService.load().then(function (json) {
324-
if (json && json.error) {
325-
widgets.alert.showAlert(JSON.stringify(json.error), false);
326-
} else {
327-
widgets.alert.showAlert("proxiedUrl:" + iPortalService.proxiedUrl, true);
328-
}
329-
330-
});
322+
requestService(serviceUrl);
331323
}
332324

333325
function getPortalTokenServiceUrl() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy