Skip to content

Commit

Permalink
Add Leaflet maxZoom to configParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
glughi committed Oct 22, 2024
1 parent dd2a2a5 commit a019cdd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.7.8)

- Add "leafletMaxZoom" to configParameters so that the maxZoom of the Leaflet viewer can be changed.
- [The next improvement]

#### 8.7.7 - 2024-10-01
Expand Down
1 change: 1 addition & 0 deletions lib/Models/Leaflet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default class Leaflet extends GlobeOrMap {
clippingRectangle: Rectangle | undefined
) => GridLayer = computedFn((ip, clippingRectangle) => {
const layerOptions = {
maxZoom: this.terria.configParameters.leafletMaxZoom,
bounds: clippingRectangle && rectangleToLatLngBounds(clippingRectangle)
};
// We have two different kinds of ImageryProviderLeaflet layers
Expand Down
4 changes: 4 additions & 0 deletions lib/Models/Terria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ export interface ConfigParameters {
*/
feedbackMinLength?: number;

/** If undefined, then Leaflet's default attribution will be used */
leafletMaxZoom: number;

/** If undefined, then Leaflet's default attribution will be used */
leafletAttributionPrefix?: string;

Expand Down Expand Up @@ -574,6 +577,7 @@ export default class Terria {
feedbackPreamble: "translate#feedback.feedbackPreamble",
feedbackPostamble: undefined,
feedbackMinLength: 0,
leafletMaxZoom: 18,
leafletAttributionPrefix: undefined,
extraCreditLinks: [
// Default credit links (shown at the bottom of the Cesium map)
Expand Down

0 comments on commit a019cdd

Please sign in to comment.