mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-10 13:05:05 +00:00
Update UnifiedNlp and fix map bug #94
This commit is contained in:
parent
3936a02e1a
commit
9fc9b9a51d
2 changed files with 11 additions and 4 deletions
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) {
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue