Skip to content

How to make the wind layer open automatically #12

Answered by danwild
Gardenias-123 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Firstly - I strongly suggest you consider using the leaflet-velocity plugin, which is much more flexible and better supported (your use-case is a good example - the leaflet-velocity layer has the benefit of being added/removed from map in the same way as any other leaflet layer).

So, secondly (for a leaflet-velocity layer) - you simply need to add the layer to the map, e.g.

// make a map
const map = L.map('map');

// make a layer
var velocityLayer = L.velocityLayer(myParams);

// add layer to map
velocityLayer.addTo(map);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Gardenias-123
Comment options

Answer selected by Gardenias-123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #11 on December 23, 2021 02:03.