wdtinc / mapbox-vector-tile-java

Java Mapbox Vector Tile Library for Encoding/Decoding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add JtsLayer(or VectorTile.Tile) object to android mapbox map?

alich65 opened this issue · comments

I want to add result layers to the android MapboxMap but I didn't find a way for do this. Can you help me?
I'm sorry if my English not very good!
Thanks in advance
`
MapView mapView = (MapView) findViewById(R.id.map_view);

    mapView.setStyleUrl(Style.SATELLITE_STREETS);

    mapView.onCreate(savedInstanceState);

    mapView.getMapAsync(new OnMapReadyCallback() {
        @RequiresApi(api = Build.VERSION_CODES.M)
        @Override
        public void onMapReady(MapboxMap mapboxMap) {
        //==================
        //not found any method for add JtsLayer to mapboxMap
        //==================
        }
    });`

This library doesn't directly integrate with the Mapbox Android SDK. It does however allow you to create vector tiles that can be stored and read by the Mapbox Android SDK. You need to look at how to setup layers / sources in their documentation. See https://www.mapbox.com/android-docs/maps/examples/add-a-vector-tile-source/