expose LocationIndicatorLayer and an alternative rendering mode based on it

This commit is contained in:
Łukasz Paczos
2020-04-08 15:07:47 +02:00
parent d7161fca1f
commit 6bb456882a
39 changed files with 2479 additions and 635 deletions

View File

@@ -13,14 +13,14 @@ import static com.mapbox.mapboxsdk.location.LocationComponentConstants.PROPERTY_
class LayerFeatureProvider {
@NonNull
Feature generateLocationFeature(@Nullable Feature locationFeature, @NonNull LocationComponentOptions options) {
Feature generateLocationFeature(@Nullable Feature locationFeature, boolean isStale) {
if (locationFeature != null) {
return locationFeature;
}
locationFeature = Feature.fromGeometry(Point.fromLngLat(0.0, 0.0));
locationFeature.addNumberProperty(PROPERTY_GPS_BEARING, 0f);
locationFeature.addNumberProperty(PROPERTY_COMPASS_BEARING, 0f);
locationFeature.addBooleanProperty(PROPERTY_LOCATION_STALE, options.enableStaleState());
locationFeature.addBooleanProperty(PROPERTY_LOCATION_STALE, isStale);
return locationFeature;
}
}