vue-leaflet / Vue2Leaflet

Vue 2 components for Leaflet maps
https://vue2-leaflet.netlify.app
MIT License
1.96k stars 380 forks source link

Add additional properties from leaflet to GridLayer #731

Open MixMasterMitch opened 8 months ago

MixMasterMitch commented 8 months ago

This PR adds the following properties from leaflet GridLayer:

See https://leafletjs.com/reference.html#gridlayer

(I am particularly interested in the maxNativeZoom option to solve the problem described in this SO)

This change has been tested by zooming in on the simple example after applying the following diff:

diff --git a/docs/examples/simple.md b/docs/examples/simple.md
index e6732fc..6266f17 100644
--- a/docs/examples/simple.md
+++ b/docs/examples/simple.md
@@ -21,6 +21,7 @@ pageClass: example-page
     <l-map
       v-if="showMap"
       :zoom="zoom"
+      :max-zoom="25"
       :center="center"
       :options="mapOptions"
       style="height: 80%"
@@ -30,6 +31,8 @@ pageClass: example-page
       <l-tile-layer
         :url="url"
         :attribution="attribution"
+        :max-native-zoom="18"
+        :max-zoom="25"
       />
       <l-marker :lat-lng="withPopup">
         <l-popup>
MixMasterMitch commented 8 months ago

@DonNicoJs or @KoRiGaN, could I please get review of this change?