Skip to content

Commit e32b449

Browse files
committed
[fix]影像服务例子页数问题 review by songym
1 parent 98684b7 commit e32b449

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

examples/leaflet/imageService.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ <h4 class="modal-title" id="myModalLabel"></h4>
628628
'</a>' +
629629
'</li>';
630630
for (var i = 1; i <= Math.ceil(features.length / pageMax) && i < pageMax; i++) {
631-
pageHtml += '<li onclick="clickPage(' + i - 1 + ')"><a href="#">' + i + '</a></li>';
631+
var pageIndex = i - 1;
632+
pageHtml += '<li onclick="clickPage('+ pageIndex + ')"><a href="#">' + i + '</a></li>';
632633
}
633634
pageHtml +=
634635
'<li id="next-page" style="margin-right: 0">' +
@@ -678,7 +679,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
678679
}
679680

680681
function clickPage(i) {
681-
currentIndex = i;
682+
currentIndex = parseInt(i);
682683
var start = tableMax * currentIndex;
683684
$($('#pagination').children('.active')).removeClass('active');
684685
$(

examples/mapboxgl/imageService.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@ <h4 class="modal-title" id="myModalLabel"></h4>
697697
'</a>' +
698698
'</li>';
699699
for (var i = 1; i <= Math.ceil(features.length / pageMax) && i < pageMax; i++) {
700-
pageHtml += '<li onclick="clickPage(' + i - 1 + ')"><a href="#">' + i + '</a></li>';
700+
var pageIndex = i - 1;
701+
pageHtml += '<li onclick="clickPage(' + pageIndex + ')"><a href="#">' + i + '</a></li>';
701702
}
702703
pageHtml +=
703704
'<li id="next-page" style="margin-right: 0">' +
@@ -747,7 +748,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
747748
}
748749

749750
function clickPage(i) {
750-
currentIndex = i;
751+
currentIndex = parseInt(i);
751752
var start = tableMax * currentIndex;
752753
$($('#pagination').children('.active')).removeClass('active');
753754
$(

examples/openlayers/imageService.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,8 @@ <h4 class="modal-title" id="myModalLabel"></h4>
806806
'</a>' +
807807
'</li>';
808808
for (var i = 1; i <= Math.ceil(features.length / pageMax) && i < pageMax; i++) {
809-
pageHtml += '<li onclick="clickPage(' + (i - 1) + ')"><a href="#">' + i + '</a></li>';
809+
var pageIndex = i - 1;
810+
pageHtml += '<li onclick="clickPage(' + pageIndex + ')"><a href="#">' + i + '</a></li>';
810811
}
811812
pageHtml +=
812813
'<li id="next-page" style="margin-right: 0">' +
@@ -856,7 +857,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
856857
}
857858

858859
function clickPage(i) {
859-
currentIndex = i;
860+
currentIndex = parseInt(i);
860861
var start = tableMax * currentIndex;
861862
$($('#pagination').children('.active')).removeClass('active');
862863
$(

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