Skip to content

Enabling Street Labels on polygons disables existing popups #19

Description

@stevevance

Describe the bug
When I enable Streets Labels on a layer of polygon features that has a Lealfet popup, the popup no longer appears after clicking the popup.

To Reproduce
Steps to reproduce the behavior:

  1. Open a map that has a Leaflet popup. Click the layer and the popup window appears over the layer.
  2. Enable Street Labels.
  3. Open the same map as in 1 and notice that the popup window no longer appears when you click the layer.

Expected behavior
I expected that the existing popup window would not be affected by enabling Street Labels.

Screenshots

Screenshot showing the popup window
image

Screenshot showing Street Labels working
image

Desktop:

  • OS: MacOS Ventura 13.1
  • Browser: Safari 16.2

Additional context

My code (I've tried this with interactive set to true and with interactive set to false):

var zoneClassRenderer = new L.StreetLabels({
		collisionFlg: false,
		propertyName: 'zone_class',
		showLabelIf: function (layer) {
			return typeof layer.properties.zone_class != "undefined";
		},
		interactive: true,
		fontStyle: {
			dynamicFontSize: false,
			fontSize: 12,
			fontSizeUnit: "px",
			lineWidth: 4.0,
			fillStyle: "black",
			strokeStyle: "white",
		},
	});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions