Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

layer without any marker crashed #14

Closed
geby opened this issue Jun 16, 2018 · 2 comments
Closed

layer without any marker crashed #14

geby opened this issue Jun 16, 2018 · 2 comments

Comments

@geby
Copy link

geby commented Jun 16, 2018

I create L.canvasIconLayer and place it to the map. But without any marker because I plan to add markers later.

When I try to move or zoom map, it raise error: n._latlngMarkers is undefined in _redraw function. (line 10680)

@eJuke
Copy link
Owner

eJuke commented Jun 20, 2018

Fixed as a part of #11

@eJuke eJuke closed this as completed Jun 20, 2018
@corg
Copy link

corg commented Sep 12, 2018

@eJuke Thank you for fixing this! Unfortunately, changes from 8cfc039 are not present in latest published version of your plugin.

Take for example the if (!this._markers) return; part in _executeListeners from that commit. See the published https://unpkg.com/leaflet-canvas-marker@0.2.0/dist/leaflet.canvas-markers.js, there _executeListeners body is not wrapped in no if(this._markers){:

screen shot 2018-09-12 at 16 56 52

While it should be wrapped, this is the version build from the source files locally:

image

My guess is that the package should be rebuild and re-published as a new version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants