Ole
Ole

Reputation: 47232

Typescript typing for leaflet options?

We can initialize leaflet like this, using an any type. Just wondering whether there is a more direct type we can use? Something like LeafletOptions?

  leafletOptions: any = {
    zoom: 2,
    minZoom: 2,
    maxZoom: 4,
    zoomControl: false,
    center: L.latLng({ lat: 38.991709, lng: -76.886109 }),
    maxBounds: new L.LatLngBounds(
      new L.LatLng(-89.98155760646617, -180),
      new L.LatLng(89.99346179538875, 180)
    ),
    maxBoundsViscosity: 1.0,
  };

Upvotes: -1

Views: 262

Answers (1)

Related Questions