mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-03 08:06:13 +01:00
Update UnifiedNlp and fix map bug #94
This commit is contained in:
parent
3936a02e1a
commit
9fc9b9a51d
2
extern/UnifiedNlp
vendored
2
extern/UnifiedNlp
vendored
@ -1 +1 @@
|
|||||||
Subproject commit eea7ff3c927234e6d958fc8bff92938bcdef1010
|
Subproject commit bd671aeeff6b13dd1f45d8e3aed27a824cfa62ab
|
@ -143,7 +143,8 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
|
|||||||
public synchronized <T extends MarkerItemMarkup> T add(T markup) {
|
public synchronized <T extends MarkerItemMarkup> T add(T markup) {
|
||||||
if (markup == null) return null;
|
if (markup == null) return null;
|
||||||
markupMap.put(markup.getId(), markup);
|
markupMap.put(markup.getId(), markup);
|
||||||
mapView.items().addItem(markup.getMarkerItem(context));
|
MarkerItem item = markup.getMarkerItem(context);
|
||||||
|
mapView.items().addItem(item);
|
||||||
redraw();
|
redraw();
|
||||||
return markup;
|
return markup;
|
||||||
}
|
}
|
||||||
@ -171,8 +172,14 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
|
|||||||
public synchronized void update(Markup markup) {
|
public synchronized void update(Markup markup) {
|
||||||
if (markup == null) return;
|
if (markup == null) return;
|
||||||
if (markup instanceof MarkerItemMarkup) {
|
if (markup instanceof MarkerItemMarkup) {
|
||||||
mapView.items().removeItem(mapView.items().getByUid(markup.getId()));
|
MarkerItem item = mapView.items().getByUid(markup.getId());
|
||||||
mapView.items().addItem(((MarkerItemMarkup) markup).getMarkerItem(context));
|
if (item != null) {
|
||||||
|
mapView.items().removeItem(item);
|
||||||
|
}
|
||||||
|
item = ((MarkerItemMarkup) markup).getMarkerItem(context);
|
||||||
|
if (item != null) {
|
||||||
|
mapView.items().addItem(item);
|
||||||
|
}
|
||||||
} else if (markup instanceof DrawableMarkup) {
|
} else if (markup instanceof DrawableMarkup) {
|
||||||
updateDrawableLayer();
|
updateDrawableLayer();
|
||||||
mapView.drawables().update();
|
mapView.drawables().update();
|
||||||
|
Loading…
Reference in New Issue
Block a user