Skip to content

Commit 192f064

Browse files
committed
修改从右下角绘制矩形做查询,无法查询到结果问题
1 parent f58d12b commit 192f064

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/leaflet/plot_symbolGeometricQuery.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ <h5 class='panel-title text-center' data-i18n="resources.title_symbolGeometricQu
180180
queryResult = L.supermap.plotting.query(map).getGObjectsInCircle(latLngs[0], radius);
181181
}
182182
if (symbolType === SuperMap.Plot.SymbolType.RECTANGLESYMBOL) {
183-
queryResult = L.supermap.plotting.query(map).getGObjectsInRect(latLngs[0], latLngs[1]);
183+
if(latLngs[0].lng < latLngs[1].lng){
184+
queryResult = L.supermap.plotting.query(map).getGObjectsInRect(latLngs[0], latLngs[1]);
185+
} else {
186+
queryResult = L.supermap.plotting.query(map).getGObjectsInRect(latLngs[1], latLngs[0]);
187+
}
184188
}
185189
if (queryResult && queryResult.length !== 0) {
186190
for (var i in queryResult) {

0 commit comments

Comments
 (0)