You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to set the style after the mvtSource has been added to the map but i'm having no luck.
i'm calling mvtsource.setStyle(function(){...})
but it doesn't seem to refer to the same object that's added to the map. Any way to retrieve a reference to the mvtSource from the map once it's already been added?
The text was updated successfully, but these errors were encountered:
I'm having a similar problem, having written a method that takes an arbitrary layer, adds one class to it using setStyle, adds it to a given map, then adds another class. Upon inspecting the DOM, the layer receives the first class but not the second.
If I modify the first setStyle call to use both classes (separated by spaces, as in the second call), the layer receives them both. If I move the second call to precede the call to addTo, both classes are received. So it seems that className can be altered, but only until the layer is attached to the map.
Also, if I add another property to the second call, such as fillColor: '#ff0000' to the path options, that is received even after attachment. So it seems like this problem is specific to className.
I'm using Leaflet 1.3.1 on Chrome 67.0.3396.87 for macOS 10.13.4.
I need to set the style after the mvtSource has been added to the map but i'm having no luck.
i'm calling mvtsource.setStyle(function(){...})
but it doesn't seem to refer to the same object that's added to the map. Any way to retrieve a reference to the mvtSource from the map once it's already been added?
The text was updated successfully, but these errors were encountered: