Search in sources :

Example 11 with SymbolLayer

use of com.mapbox.mapboxsdk.style.layers.SymbolLayer in project androidApp by InspectorIncognito.

the class OnBusEngine method setupBusStopRouteLayer.

private void setupBusStopRouteLayer() {
    busStopSource = new GeoJsonSource(SOURCE_BUS_STOPS, FeatureCollection.fromFeatures(new Feature[] {}));
    mapboxMap.addSource(busStopSource);
    Layer routeLayer = new SymbolLayer("BUS_STOP_ROUTE_ID", SOURCE_BUS_STOPS).withProperties(iconImage("routeBusIcon"), iconSize(0.8f), /* allows show all icons */
    iconAllowOverlap(true), iconOffset(new Float[] { BusStopMarker.MARKER_DX_OFFSET, BusStopMarker.MARKER_DY_OFFSET }));
    routeLayer.setMinZoom(15);
    mapboxMap.addLayerAbove(routeLayer, BUS_STOP_SELECTED_MARKER_LAYER_ID);
}
Also used : GeoJsonSource(com.mapbox.mapboxsdk.style.sources.GeoJsonSource) SymbolLayer(com.mapbox.mapboxsdk.style.layers.SymbolLayer) Layer(com.mapbox.mapboxsdk.style.layers.Layer) SymbolLayer(com.mapbox.mapboxsdk.style.layers.SymbolLayer)

Aggregations

SymbolLayer (com.mapbox.mapboxsdk.style.layers.SymbolLayer)11 Layer (com.mapbox.mapboxsdk.style.layers.Layer)5 Bitmap (android.graphics.Bitmap)4 CircleLayer (com.mapbox.mapboxsdk.style.layers.CircleLayer)1 LineLayer (com.mapbox.mapboxsdk.style.layers.LineLayer)1 GeoJsonSource (com.mapbox.mapboxsdk.style.sources.GeoJsonSource)1 Source (com.mapbox.mapboxsdk.style.sources.Source)1 VectorSource (com.mapbox.mapboxsdk.style.sources.VectorSource)1 Test (org.junit.Test)1