Skip to content

Commit 5be25d5

Browse files
committed
【example】修复iportal例子,更新服务地址
1 parent a42690c commit 5be25d5

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

examples/component/components_timeline_supermap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
}
116116
},
117117
url:
118-
'https://www.supermapol.com/proxy/iserver/services/map_supermap_building1_qqm0ighb/rest/maps/',
118+
'https://www.supermapol.com/proxy/a9b367e2260de1e2/iserver/services/map_supermap_building1_rdef24g1/rest/maps/',
119119
encodeUrl:
120120
'/image.png?viewBounds=%7B"leftBottom"%3A%7B"x"%3A11586898.539611159%2C"y"%3A3570491.9618448047%7D%2C"rightTop"%3A%7B"x"%3A11588127.387288133%2C"y"%3A3571087.184938393%7D%7D%20&center=%7B"x"%3A11587505.74%2C"y"%3A3570771.31%7D&width=1920&scale=0.000346564548&prjCoordSys=%7B"epsgCode"%3A3857%7D&transparent=true&height=930',
121121
data: [

examples/js/tokengenerator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
window.exampleToken = "PisX2NS9DsMKnnNzs6lg5WzjwZqvH2zXcizVYuBG0L0MvPrnBafdbATturwemCbsdUMHvIfItEBVCAcgubl-UNDHMsJU_XJWanQN65xaOUj_xMCsSTkKn26WFWLgvKBy";
2-
window.iportalToken ="YDXLzgADk20EZ4PWXFn7FZ5gtydmT3GdaMt5HiBUNPlZBmafJjoce4KYZMFopVGL3K_P4BbT-MVuq2GJ6YfZJw.."
2+
window.iportalToken ="YDXLzgADk20EZ4PWXFn7FW-TvWJtAQGR4SQk3bXCkyhvv_7NhFJ8AEdyVk4BaYDO39bo4oLEC4bXorZ6qIJDxQ.."
3+
window.iportalKey ="S3XYMe6UVH3rWPNbM979PybI"

examples/leaflet/iPortalSecurity.html

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
247247
//SuperMap.Support.cors = false;
248248
$(document).ready(function () {
249249
$("#loginUrl_iportal").val("http://localhost:8090/iportal");
250-
$("#tokenServiceUrl_iportal").val("https://iportal.supermap.io/iportal/web/services/707656630");
251-
$("#token_iportal").val("_Bo_ksR9DC56MvnAXc6liuhAdWmmt1SuoLX758QIeBJUvteLqHqUeeHnQ6OU0i0VBoN5FjNP_SOQ2o1xyudBjA..");
250+
$("#tokenServiceUrl_iportal").val("https://iportal.supermap.io/iportal/web/services/925052030");
251+
$("#token_iportal").val(window.iportalToken);
252252

253-
$("#serviceUrl_iportal").val("http://support.supermap.com.cn:8099/ywutslmu/iserver/services/map-china400/rest/maps/China_4326");
254-
$('#key_iportal').val("CBIrkfXEAjydLrfp364qgM3P");
255-
$("#serviceUrlMap_iportal").val("http://support.supermap.com.cn:8099/ywutslmu/iserver/services/map-china400/rest/maps/China_4326");
256-
$('#mapKey_iportal').val("CBIrkfXEAjydLrfp364qgM3P");
253+
$("#serviceUrl_iportal").val("https://iportal.supermap.io/portalproxy/rz0fn8kv/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces");
254+
$('#key_iportal').val(window.iportalKey);
255+
$("#serviceUrlMap_iportal").val("https://iportal.supermap.io/portalproxy/rz0fn8kv/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces");
256+
$('#mapKey_iportal').val(window.iportalKey);
257257

258258
});
259259

@@ -321,16 +321,9 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
321321
return;
322322
}
323323
L.supermap.SecurityManager.destroyToken(serviceUrl);
324+
L.supermap.SecurityManager.destroyKey(serviceUrl);
324325
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-
});
326+
requestService(serviceUrl);
334327
}
335328

336329
function getPortalTokenServiceUrl() {
@@ -347,6 +340,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
347340
if (!checkUrl(serviceUrl)) {
348341
return;
349342
}
343+
L.supermap.SecurityManager.destroyToken(serviceUrl);
350344
L.supermap.SecurityManager.destroyKey(serviceUrl);
351345
L.supermap.SecurityManager.registerKey(serviceUrl, key);
352346
requestService(serviceUrl);

examples/openlayers/iPortalSecurity.html

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
246246
//SuperMap.Support.cors = false;
247247
$(document).ready(function () {
248248
$("#loginUrl_iportal").val("http://localhost:8090/iportal");
249-
$("#tokenServiceUrl_iportal").val("https://iportal.supermap.io/iportal/web/services/707656630");
250-
$("#token_iportal").val("_Bo_ksR9DC56MvnAXc6liuhAdWmmt1SuoLX758QIeBJUvteLqHqUeeHnQ6OU0i0VBoN5FjNP_SOQ2o1xyudBjA..");
249+
$("#tokenServiceUrl_iportal").val("https://iportal.supermap.io/iportal/web/services/925052030");
250+
$("#token_iportal").val(window.iportalToken);
251251

252-
$("#serviceUrl_iportal").val("http://support.supermap.com.cn:8099/ywutslmu/iserver/services/map-china400/rest/maps/China_4326");
253-
$('#key_iportal').val("CBIrkfXEAjydLrfp364qgM3P");
254-
$("#serviceUrlMap_iportal").val("http://support.supermap.com.cn:8099/ywutslmu/iserver/services/map-china400/rest/maps/China_4326");
255-
$('#mapKey_iportal').val("CBIrkfXEAjydLrfp364qgM3P");
252+
$("#serviceUrl_iportal").val("https://iportal.supermap.io/portalproxy/rz0fn8kv/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces");
253+
$('#key_iportal').val(window.iportalKey);
254+
$("#serviceUrlMap_iportal").val("https://iportal.supermap.io/portalproxy/rz0fn8kv/iserver/services/map-ChinaProvinces/rest/maps/ChinaProvinces");
255+
$('#mapKey_iportal').val(window.iportalKey);
256256
});
257257

258258
/*登录*/
@@ -318,16 +318,9 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
318318
return;
319319
}
320320
ol.supermap.SecurityManager.destroyToken(serviceUrl);
321+
ol.supermap.SecurityManager.destroyKey(serviceUrl);
321322
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-
});
323+
requestService(serviceUrl);
331324
}
332325

333326
function getPortalTokenServiceUrl() {
@@ -344,6 +337,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
344337
if (!checkUrl(serviceUrl)) {
345338
return;
346339
}
340+
ol.supermap.SecurityManager.destroyToken(serviceUrl);
347341
ol.supermap.SecurityManager.destroyKey(serviceUrl);
348342
ol.supermap.SecurityManager.registerKey(serviceUrl, key);
349343
requestService(serviceUrl);

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