Skip to content

Commit

Permalink
Fix maps wms zoom limitation (#1915)
Browse files Browse the repository at this point in the history
When using WMS to customize base tile maps in region map or coordinate maps, user aren’t able to get into higher zoom levels than opensearch maps service default maximum zoom level.

Issue Resolved:
opensearch-project/maps#19

Signed-off-by: Junqiu Lei <junqiu@amazon.com>
  • Loading branch information
junqiu-lei authored Aug 12, 2022
1 parent bb67c71 commit 4dd7f14
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ export function BaseMapsVisualizationProvider() {

try {
if (this._wmsConfigured()) {
if (WMS_MINZOOM > this._opensearchDashboardsMap.getMaxZoomLevel()) {
const currentMaxZoomLevel = this._opensearchDashboardsMap.getMaxZoomLevel();
if (WMS_MINZOOM < currentMaxZoomLevel || WMS_MAXZOOM > currentMaxZoomLevel) {
this._opensearchDashboardsMap.setMinZoom(WMS_MINZOOM);
this._opensearchDashboardsMap.setMaxZoom(WMS_MAXZOOM);
}
Expand Down

0 comments on commit 4dd7f14

Please sign in to comment.