Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fc9b9a5 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Update UnifiedNlp and fix map bug #94

parent 3936a02e
Loading
Loading
Loading
Loading
Compare eea7ff3c to bd671aee
Original line number Diff line number Diff line
Subproject commit eea7ff3c927234e6d958fc8bff92938bcdef1010
Subproject commit bd671aeeff6b13dd1f45d8e3aed27a824cfa62ab
+10 −3
Original line number Diff line number Diff line
@@ -143,7 +143,8 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
    public synchronized <T extends MarkerItemMarkup> T add(T markup) {
        if (markup == null) return null;
        markupMap.put(markup.getId(), markup);
        mapView.items().addItem(markup.getMarkerItem(context));
        MarkerItem item = markup.getMarkerItem(context);
        mapView.items().addItem(item);
        redraw();
        return markup;
    }
@@ -171,8 +172,14 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
    public synchronized void update(Markup markup) {
        if (markup == null) return;
        if (markup instanceof MarkerItemMarkup) {
            mapView.items().removeItem(mapView.items().getByUid(markup.getId()));
            mapView.items().addItem(((MarkerItemMarkup) markup).getMarkerItem(context));
            MarkerItem item = mapView.items().getByUid(markup.getId());
            if (item != null) {
                mapView.items().removeItem(item);
            }
            item = ((MarkerItemMarkup) markup).getMarkerItem(context);
            if (item != null) {
                mapView.items().addItem(item);
            }
        } else if (markup instanceof DrawableMarkup) {
            updateDrawableLayer();
            mapView.drawables().update();