From b128fad4baa5fcfaf737bffa64eab8f741155987 Mon Sep 17 00:00:00 2001 From: Dmitriy Ruban Date: Thu, 19 Dec 2019 11:18:48 +0200 Subject: [PATCH] shields in top bar --- .../plus/views/mapwidgets/MapInfoWidgetsFactory.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index cc3c845343..eed4c5bb77 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -34,6 +34,7 @@ import com.jwetherell.openmap.common.UTMPoint; import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.LocationConvert; +import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.RouteDataObject; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -1055,8 +1056,11 @@ public class MapInfoWidgetsFactory { "ยป"); } if (ref != null) { - setShield(shieldIcon, assembleShieldString(rt.getShieldColor().value, - rt.getShieldShape().value, + BinaryMapIndexReader.TagValuePair colorPair = rt.getShieldColor(); + BinaryMapIndexReader.TagValuePair shapePair = rt.getShieldShape(); + setShield(shieldIcon, assembleShieldString( + colorPair != null ? colorPair.value : null, + shapePair != null ? shapePair.value : null, ref.length()), ref); AndroidUiHelper.updateVisibility(shieldIcon, true); }else {