Skip to content

No action when bind onclick or bindPopup #73

@GarryBrown

Description

@GarryBrown

I saw issue about FeatureGroup. It must work, but it's doesn't. Maybe i had a mistake.

From dosc FeatureGroup

L.featureGroup([marker1, marker2, polyline])
    .bindPopup('Hello world!')
    .on('click', function() { alert('Clicked on a member of the group!'); })
    .addTo(map);

From your example with listener and bindPopup

var arrow = L.polyline([[57, -19], [60, -12]], {}).addTo(map);
var arrowHead = L.polylineDecorator(arrow, {
      patterns: [
          { offset: '100%', repeat: 0, symbol: L.Symbol.arrowHead(
                   { pixelSize: 15, polygon: false, pathOptions: { stroke: true } }
             ) }
            ]
        })
            .bindPopup('Hello world!')
            .on('mouseover', function () { console.log('test') })
            .addTo(map);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions