From b2671d185affb99de8d3158986fefa1f7ad24a12 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 11 May 2016 20:26:25 +1200 Subject: [PATCH] add a section in README about overriding minimum zoom --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 34d3d3e..6c3d817 100644 --- a/README.md +++ b/README.md @@ -385,6 +385,21 @@ and if so, uses it, so it won't load a second copy of the library. ``` +### Override the default minimum zoom + +*WARNING*: Setting these options can break markers calculation, causing no homeomorphism between screen coordinates and map. + +You can use the `minZoomOverride` associated with the `minZoom` in the custom map options to prevent a minimum zoom from being calculated: + +```javascript +function createMapOptions() { + return { + minZoomOverride: true, + minZoom: 2, + }; +} +``` + --- (*Really big thanks to [April Arcus](https://github.com/AprilArcus) for documentation fixes*)