heremaps / harp-leaflet

Leaflet plugin for harp.gl
http://heremaps.github.io/harp-leaflet/
Apache License 2.0
17 stars 4 forks source link

HarpGL Layer does not implement interface method onRemoved #8

Closed david-schopf closed 4 years ago

david-schopf commented 4 years ago

When leaflet (1.5.1) has removed a layer from the map it calls "onRemove" on the layer. Therefore all subclasses should implement a "onRemove" method.

See https://github.com/Leaflet/Leaflet/blob/master/src/layer/Layer.js lines 121-130

Unfortunately, the HarpGL layer is missing the onRemove method and therefore an error is thrown at the leaflet (Layer.js) call in line 185: onRemove is not a function.

This happens when harpGL.removeFrom(map) is called.

skosmella commented 4 years ago

Hi, thanks for raising this issue. We are looking into it and hope to be able to provide a fix soon.