• Resolved jddean123

    (@jddean123)


    I noticed that there doesn’t appear to be a default overlay layer in the Leaflet map. There also doesn’t appear to be a way to set the default overlay layer. Did I miss something or is it not currently a feature?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Uwe Jacobs

    (@uwejacobs)

    This feature does currently not exist. I consider adding it in one of the upcoming releases.

    Thread Starter jddean123

    (@jddean123)

    Thanks! Really appreciate all the hard work!

    For reference, you just need to add the layer name in the map init:

    var map = L.map(“owmw-map-container-304-4-3”, {
    center: new L.LatLng(42.3902, -122.9177),
    zoom: 9, layers: [osm,raincls], // The default overlay layer(s) is set comma delimited after the base layer
    scrollWheelZoom: true
    });

    I spent a little bit trying to see if I could override the init, but I didn’t find much without getting pretty deep. I’d make the adjustment myself, but I don’t want to mess with the plugin directly.

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Version 5.2.2 is now capable of turning on one or more layers by default. After the update, please double-check your map settings.
    I also hacked up an air-temperature legend for Fahrenheit in case you are using the imperial measurement system.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Set Default map layer?’ is closed to new replies.