tuyen-vuduc / dotnet-mapbox-quickstart

Mapbox quick-start and examples for .NET
MIT License
3 stars 1 forks source link

Vector tiles support #6

Open jmielczarkowski opened 7 months ago

jmielczarkowski commented 7 months ago

Hi, I was trying to use package 11.1.0 on my iPhone and it deploys but I find out vector tiles are not loading. I spend some time and couldn't figure out why it's not working, so I decided to do a check on Android, where on 10.11.1 vector tiles are working fine. I find out that on latest package they stops working too on Android. Now I wonder if that's issue with some changes that are between 10.11.1 and 11.1.0 or it's maybe issue with package?

Package update:

    <PackageReference Include="Com.Mapbox.Maps.Android" Version="10.11.1" />
    <PackageReference Include="Com.Mapbox.Maps.Android" Version="11.1.0" />

Code that loads vector tiles (and styles): _mapView.MapboxMap.LoadStyleJson(styleJson: styleAsJson);

My style is default Satellite Streets, version 8, plus I added myVectorTiles source and someLinesSources. I must admit that someLinesSources works fine, as well as other json part. Only vector tiles seems to not loads. Any idea what I can check or what setup turn on to see mode debug info?

"sources": {
        "mapbox://mapbox.satellite": {
            "url": "mapbox://mapbox.satellite",
            "type": "raster",
            "tileSize": 256
        },
        "composite": {
            "url": "mapbox://mapbox.mapbox-streets-v8",
            "type": "vector"
        },
        "myVectorTiles": {
            "type": "vector",
            "url": "https://myapi/tile.json?filter=data_uuid='123'"
        },
        "someLinesSources": {
            "type": "geojson",
            "data": {
                "type": "Feature",
                "properties": {},
                "geometry": {
                    "type": "LineString",
                    "coordinates": [
                    [...]
                    ]
                }
            }
        }
    }

In my output I can only see (in Android):

mReversing is false. Don't call initChildren.

tuyen-vuduc commented 7 months ago

@jmielczarkowski Have you checked it out with latest Android SDK natively with Kotlin?

Other than that, please share a sample source code to evaluate then.

jmielczarkowski commented 7 months ago

Hi,

I will check it on Android SDK / Kotlin as you suggested.