Skip to content

Commit ec0b3f8

Browse files
committed
[fix]影像服务api修改地址,国际化 review by songym
1 parent 7b8f67e commit ec0b3f8

File tree

5 files changed

+29
-51
lines changed

5 files changed

+29
-51
lines changed

examples/leaflet/imageService.html

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -303,27 +303,16 @@ <h4 class="panel-title">
303303
<table class="table table-bordered">
304304
<thead>
305305
<tr>
306-
<th>ID</th>
307-
<th>文件名称</th>
308-
<th>添加时间</th>
309-
<th>浏览影像</th>
306+
<th>ID</th>
307+
<th data-i18n="resources.text_filename"></th>
308+
<th data-i18n="resources.text_addTime"></th>
309+
<th data-i18n="resources.text_showImage"></th>
310310
</tr>
311311
</thead>
312312
<tbody id="collectionsTbody"></tbody>
313313
</table>
314314
<nav class="page" aria-label="Page navigation">
315-
<ul id="pagination" class="pagination">
316-
<li id="previous-page">
317-
<a href="#" aria-label="Previous">
318-
<span aria-hidden="true">&laquo;</span>
319-
</a>
320-
</li>
321-
<li id="next-page" style="margin-right: 0">
322-
<a href="#" aria-label="Next">
323-
<span aria-hidden="true">&raquo;</span>
324-
</a>
325-
</li>
326-
</ul>
315+
<ul id="pagination" class="pagination"></ul>
327316
</nav>
328317
</div>
329318
</div>
@@ -357,7 +346,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
357346
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
358347
var mapUrl = host + '/iserver/services/map-world/rest/maps/World';
359348
var root = host + '/iserver/services/imageservice-hainan/restjsr';
360-
var url = host + '/iserver/services/data-China100/rest/data';
349+
var url = host + '/iserver/services/data-china400/rest/data';
361350
var map = L.map('map', {
362351
crs: L.CRS.EPSG4326,
363352
center: [19.2, 110],
@@ -526,6 +515,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
526515
var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
527516
queryParameter: { attributeFilter: "PAC Like '46%'" },
528517
datasetNames: ['China:City_R'],
518+
targetPrj: { epsgCode: 4326 },
529519
maxFeatures: 10000
530520
});
531521
new L.supermap.featureService(url).getFeaturesBySQL(sqlParam, function (serviceResult) {

examples/locales/en-US/resources.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,10 @@ window.examplesResources = {
752752
"text_removeResult": "Remove result",
753753
"text_addPath": "Add path",
754754
"text_query": "To query",
755+
"text_reset": "Reset",
756+
"text_filename": 'FileName',
757+
"text_addTime": 'AddTime',
758+
"text_showImage": 'ShowImage',
755759
"text_analyse": "To anaylse",
756760
"text_closestFacilitiesService": "Closest Facilities Analysis Service",
757761
"text_weightField": "Weight field:",

examples/locales/zh-CN/resources.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,9 @@ window.examplesResources = {
704704
"text_addPath": "生成路径",
705705
"text_query": "查询",
706706
"text_reset": "重置",
707+
"text_filename": '文件名称',
708+
"text_addTime": '添加时间',
709+
"text_showImage": '浏览影像',
707710
"text_analyse": "分析",
708711
"text_closestFacilitiesService": "最近设施分析",
709712
"text_weightField": "权重字段:",

examples/mapboxgl/imageService.html

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -302,27 +302,16 @@ <h4 class="panel-title">
302302
<table class="table table-bordered">
303303
<thead>
304304
<tr>
305-
<th>ID</th>
306-
<th>文件名称</th>
307-
<th>添加时间</th>
308-
<th>浏览影像</th>
305+
<th>ID</th>
306+
<th data-i18n="resources.text_filename"></th>
307+
<th data-i18n="resources.text_addTime"></th>
308+
<th data-i18n="resources.text_showImage"></th>
309309
</tr>
310310
</thead>
311311
<tbody id="collectionsTbody"></tbody>
312312
</table>
313313
<nav class="page" aria-label="Page navigation">
314-
<ul id="pagination" class="pagination">
315-
<li id="previous-page">
316-
<a href="#" aria-label="Previous">
317-
<span aria-hidden="true">&laquo;</span>
318-
</a>
319-
</li>
320-
<li id="next-page" style="margin-right: 0">
321-
<a href="#" aria-label="Next">
322-
<span aria-hidden="true">&raquo;</span>
323-
</a>
324-
</li>
325-
</ul>
314+
<ul id="pagination" class="pagination"></ul>
326315
</nav>
327316
</div>
328317
</div>
@@ -356,7 +345,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
356345
<script type="text/javascript">
357346
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
358347
var root = host + '/iserver/services/imageservice-hainan/restjsr';
359-
var url = host + '/iserver/services/data-China100/rest/data';
348+
var url = host + '/iserver/services/data-china400/rest/data';
360349
var attribution =
361350
"<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +
362351
"with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +
@@ -457,7 +446,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
457446
});
458447
}, 2000);
459448
}
460-
449+
461450
function showSearchResultBox(searchResult) {
462451
if (searchResult === undefined) {
463452
removeLayer(map, searchBoxLayerID);
@@ -576,6 +565,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
576565
var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
577566
queryParameter: { attributeFilter: "PAC Like '46%'" },
578567
datasetNames: ['China:City_R'],
568+
targetPrj: { epsgCode: 4326 },
579569
maxFeatures: 10000
580570
});
581571
new mapboxgl.supermap.FeatureService(url).getFeaturesBySQL(sqlParam, function (serviceResult) {

examples/openlayers/imageService.html

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -296,26 +296,15 @@ <h4 class="panel-title">
296296
<thead>
297297
<tr>
298298
<th>ID</th>
299-
<th>文件名称</th>
300-
<th>添加时间</th>
301-
<th>浏览影像</th>
299+
<th data-i18n="resources.text_filename"></th>
300+
<th data-i18n="resources.text_addTime"></th>
301+
<th data-i18n="resources.text_showImage"></th>
302302
</tr>
303303
</thead>
304304
<tbody id="collectionsTbody"></tbody>
305305
</table>
306306
<nav class="page" aria-label="Page navigation">
307-
<ul id="pagination" class="pagination">
308-
<li id="previous-page">
309-
<a href="#" aria-label="Previous">
310-
<span aria-hidden="true">&laquo;</span>
311-
</a>
312-
</li>
313-
<li id="next-page" style="margin-right: 0">
314-
<a href="#" aria-label="Next">
315-
<span aria-hidden="true">&raquo;</span>
316-
</a>
317-
</li>
318-
</ul>
307+
<ul id="pagination" class="pagination"></ul>
319308
</nav>
320309
</div>
321310
</div>
@@ -350,7 +339,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
350339
<script type="text/javascript">
351340
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
352341
var root = host + '/iserver/services/imageservice-hainan/restjsr';
353-
var url = host + '/iserver/services/data-China100/rest/data';
342+
var url = host + '/iserver/services/data-china400/rest/data';
354343
var projection = 'EPSG:4326';
355344
var map = new ol.Map({
356345
target: 'map',
@@ -693,6 +682,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
693682
var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
694683
queryParameter: { attributeFilter: "PAC Like '46%'" },
695684
datasetNames: ['China:City_R'],
685+
targetPrj: { epsgCode: 4326 },
696686
maxFeatures: 10000
697687
});
698688
new ol.supermap.FeatureService(url).getFeaturesBySQL(sqlParam, function (serviceResult) {
@@ -808,6 +798,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
808798
}
809799

810800
function appendPage(features) {
801+
$('#pagination').empty();
811802
var pageHtml =
812803
'<li id="previous-page" class="disabled" onclick="goPrevious()">' +
813804
'<a href="#" aria-label="Previous">' +

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