wdtinc / mapbox-vector-tile-java

Java Mapbox Vector Tile Library for Encoding/Decoding
Apache License 2.0
147 stars 73 forks source link

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

Closed alich65 closed 6 years ago

alich65 commented 6 years ago

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
        //==================
        }
    });`
ShibaBandit commented 6 years ago

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/