Skip to content

setStyle undefined with nodeFeature = Marker #7

@stesie

Description

@stesie

I wonder if this is a bit of undocumented behaviour/use, since the README doesn't list nodeFeature below style options. Yet I wanted overpass-layer to render just plain L.Marker for nodes, i.e. not CircleMarker as it normally does, and the code seems to handle it well... at least on first render :)

So I've set style: { nodeFeature: 'Marker' } ...

upon re-processing of the objects, i.e. after zooming out, overpass-layer crashes in _processObject at

        if (data.features[styleId]) {
          data.features[styleId].setStyle(style)

... since it's reprocessing, it takes the if-branch, and simply assumes setStyle to be callable. This function is defined on L.Circle (and L.Path) ... yet not on L.Marker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions