Add background image for GPS mode in IndicatorLocationLayerRender. (#439)

This commit is contained in:
Kevin Li
2020-06-24 18:24:34 +08:00
committed by GitHub
parent 967a57f2aa
commit 1744a892c3
2 changed files with 3 additions and 3 deletions

View File

@@ -219,7 +219,7 @@ class IndicatorLocationLayerRenderer implements LocationLayerRenderer {
case RenderMode.GPS:
topImage = "";
bearingImage = isStale ? FOREGROUND_STALE_ICON : FOREGROUND_ICON;
shadowImage = "";
shadowImage = isStale ? BACKGROUND_STALE_ICON : BACKGROUND_ICON;
setAccuracyRadius(0f);
break;
case RenderMode.NORMAL:

View File

@@ -119,7 +119,7 @@ class IndicatorLocationLayerRendererTest {
layer.setProperties(
LocationPropertyFactory.topImage(""),
LocationPropertyFactory.bearingImage(FOREGROUND_ICON),
LocationPropertyFactory.shadowImage("")
LocationPropertyFactory.shadowImage(BACKGROUND_ICON)
)
}
verify { layer.setProperties(LocationPropertyFactory.accuracyRadius(0f)) }
@@ -159,7 +159,7 @@ class IndicatorLocationLayerRendererTest {
layer.setProperties(
LocationPropertyFactory.topImage(""),
LocationPropertyFactory.bearingImage(FOREGROUND_STALE_ICON),
LocationPropertyFactory.shadowImage("")
LocationPropertyFactory.shadowImage(BACKGROUND_STALE_ICON)
)
}
verify { layer.setProperties(LocationPropertyFactory.accuracyRadius(0f)) }