Skip to content

Commit fafad6f

Browse files
committed
Fix JLVaadinGeoJsonLayer to correctly remove GeoJson layers by updating callback handler reference
Signed-off-by: makbn <[email protected]>
1 parent cf378c4 commit fafad6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

jlmap-vaadin/src/main/java/io/github/makbn/jlmap/vaadin/layer/JLVaadinGeoJsonLayer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import io.github.makbn.jlmap.geojson.JLGeoJsonURL;
1010
import io.github.makbn.jlmap.layer.leaflet.LeafletGeoJsonLayerInt;
1111
import io.github.makbn.jlmap.model.JLGeoJson;
12-
import io.github.makbn.jlmap.model.JLPolygon;
1312
import io.github.makbn.jlmap.model.builder.JLGeoJsonObjectBuilder;
1413
import lombok.AccessLevel;
1514
import lombok.NonNull;
@@ -76,7 +75,7 @@ public JLGeoJson addFromContent(@NonNull String content)
7675
public boolean removeGeoJson(@NonNull String id) {
7776
try {
7877
engine.executeScript(removeLayerWithUUID(id));
79-
callbackHandler.remove(JLPolygon.class, id);
78+
callbackHandler.remove(JLGeoJson.class, id);
8079
return true;
8180
} catch (RuntimeException e) {
8281
log.error(e.getMessage(), e);

0 commit comments

Comments
 (0)