Search in sources :

Example 1 with FeatureCollection

use of com.mapbox.services.commons.geojson.FeatureCollection in project mapbox-navigation-android by mapbox.

the class NavigationMapRoute method updateRoute.

private void updateRoute() {
    // alternative or primary.
    for (FeatureCollection featureCollection : featureCollections) {
        if (!(featureCollection.getFeatures().get(0).getGeometry() instanceof Point)) {
            int index = featureCollection.getFeatures().get(0).getNumberProperty(INDEX_KEY).intValue();
            updatePrimaryShieldRoute(String.format(Locale.US, ID_FORMAT, GENERIC_ROUTE_SHIELD_LAYER_ID, index), index);
            updatePrimaryRoute(String.format(Locale.US, ID_FORMAT, GENERIC_ROUTE_LAYER_ID, index), index);
        }
    }
}
Also used : FeatureCollection(com.mapbox.services.commons.geojson.FeatureCollection) Point(com.mapbox.services.commons.geojson.Point) Point(com.mapbox.services.commons.geojson.Point)

Aggregations

FeatureCollection (com.mapbox.services.commons.geojson.FeatureCollection)1 Point (com.mapbox.services.commons.geojson.Point)1