Search in sources :

Example 6 with SymbolManager

use of com.mapbox.mapboxsdk.plugins.annotation.SymbolManager in project mapbox-plugins-android by mapbox.

the class BulkSymbolActivity method initMap.

private void initMap(MapboxMap mapboxMap) {
    this.mapboxMap = mapboxMap;
    mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(38.87031, -77.00897), 10));
    mapboxMap.setStyle(new Style.Builder().fromUri(Style.MAPBOX_STREETS), style -> {
        findViewById(R.id.fabStyles).setOnClickListener(v -> mapboxMap.setStyle(Utils.INSTANCE.getNextStyle()));
        symbolManager = new SymbolManager(mapView, mapboxMap, style);
        symbolManager.setIconAllowOverlap(true);
        loadData(0);
    });
}
Also used : SymbolManager(com.mapbox.mapboxsdk.plugins.annotation.SymbolManager) LatLng(com.mapbox.mapboxsdk.geometry.LatLng)

Aggregations

SymbolManager (com.mapbox.mapboxsdk.plugins.annotation.SymbolManager)6 LatLng (com.mapbox.mapboxsdk.geometry.LatLng)4 SymbolOptions (com.mapbox.mapboxsdk.plugins.annotation.SymbolOptions)2 ValueAnimator (android.animation.ValueAnimator)1 Color (android.graphics.Color)1 PointF (android.graphics.PointF)1 Bundle (android.os.Bundle)1 Menu (android.view.Menu)1 MenuItem (android.view.MenuItem)1 View (android.view.View)1 LinearInterpolator (android.view.animation.LinearInterpolator)1 TextView (android.widget.TextView)1 Toast (android.widget.Toast)1 AppCompatActivity (androidx.appcompat.app.AppCompatActivity)1 FloatingActionButton (com.google.android.material.floatingactionbutton.FloatingActionButton)1 FeatureCollection (com.mapbox.geojson.FeatureCollection)1 Point (com.mapbox.geojson.Point)1 CameraPosition (com.mapbox.mapboxsdk.camera.CameraPosition)1 CameraUpdateFactory (com.mapbox.mapboxsdk.camera.CameraUpdateFactory)1 MapView (com.mapbox.mapboxsdk.maps.MapView)1