Skip to content

Allow popups on VectorGrid point features with radius <= 10 #295

Description

@TcgEndo

Hi, thank you for maintaining Leaflet.VectorGrid.

When using Leaflet.VectorGrid.Protobuf with point data, I would like popups to work even when the point radius is less than 11.

Observed behavior

In my setup:

  • radius >= 11 → the point is rendered and the popup works without any errors
  • radius <= 10 → the point geometry is rendered correctly, but clicking on the point causes an error and the popup does not open

The error message is:

Uncaught TypeError: Cannot read properties of undefined (reading 'lat')

I was able to work around this by following the solution described in this comment on issue #267:
#267 (comment)

However, it took me quite a while to find this workaround.
It would be very helpful if popups worked out of the box for VectorGrid point features with smaller radii (i.e. < 11), or if there were an official fix or clearer guidance in the documentation.

Environment

  • Leaflet: v1.9.4
  • Leaflet.VectorGrid: v1.3.0 (Protobuf / Slicer)
  • Browser: Chrome 141.0.7390.123
  • OS: Windows 11

Thank you for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions