Skip to content

Commit

Permalink
Update WMS zoom conditional check
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <junqiu@amazon.com>
  • Loading branch information
junqiu-lei committed Aug 2, 2022
1 parent 9678a4b commit 9609ff3
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_MAXZOOM > this._opensearchDashboardsMap.getMaxZoomLevel()) {
const curMaxZoomLevel = this._opensearchDashboardsMap.getMaxZoomLevel();
if (WMS_MINZOOM < curMaxZoomLevel || WMS_MAXZOOM > curMaxZoomLevel) {
this._opensearchDashboardsMap.setMinZoom(WMS_MINZOOM);
this._opensearchDashboardsMap.setMaxZoom(WMS_MAXZOOM);
}
Expand Down

0 comments on commit 9609ff3

Please sign in to comment.