flutter-mapbox-gl / maps

A Mapbox GL flutter package for creating custom maps
Other
1.03k stars 498 forks source link

App crashes when Cluster properties are added in addSource #1405

Closed sayantan-poddar06 closed 4 months ago

sayantan-poddar06 commented 6 months ago

image

void onMapCreated(MapboxMapController mapboxMap) async {
    await getJson();

    // Add the GeoJSON source to the map
    await mapboxMap.addSource(
        "fills",
        GeojsonSourceProperties(
            data: geojson,
            cluster: true,
            clusterMaxZoom: 14, // Max zoom to cluster points on
            clusterRadius:
                50 // Radius of each cluster when clustering points (defaults to 50)
            ));
    });

    update();
  }

I did the same as this code, but when i add this properties

 cluster: true,
 clusterMaxZoom: 14, // Max zoom to cluster points on
 clusterRadius: 50 // Radius of each cluster when clustering points (defaults to 50)

it crashes the app!!!

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.