fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.68k stars 848 forks source link

Load data from an external GeoJSON file #1881

Closed m-hamza-tanbits closed 1 month ago

m-hamza-tanbits commented 1 month ago

What do you want implemented?

image

in map box we can extract from data from file due to large amount of data . Example code

    mapController!.addSource(
      'multiPolygons', // Unique ID for the source
      GeojsonSourceProperties(
        data: 'https://s3.ap-southeast-1.amazonaws.com/isn-landscape/isn/public/1/original/map%20(18)_1715585465413072.geojson'
        // 'https://s3.ap-southeast-1.amazonaws.com/isn-landscape/isn/public/1/original/map (19)_1715664018556365.geojson',
      ),
    );

Is there any way we can achieve this while i am using http and get data from url and show in map, the map goes stuck.

What other alternatives are available?

    mapController!.addSource(
      'multiPolygons', // Unique ID for the source
      GeojsonSourceProperties(
        data: 'https://s3.ap-southeast-1.amazonaws.com/isn-landscape/isn/public/1/original/map%20(18)_1715585465413072.geojson'
        // 'https://s3.ap-southeast-1.amazonaws.com/isn-landscape/isn/public/1/original/map (19)_1715664018556365.geojson',
      ),
    );

Can you provide any other information?

No response

Severity

Obtrusive: No workarounds are available, and this is essential to me

JaffaKetchup commented 1 month ago

Please read the documentation and check for previous issues. GeoJSON support is outside of our scope. However, there is a plugin available: https://github.com/jozes/flutter_map_geojson.

josxha commented 1 month ago

There are actually two plugins that add geojson support, both are up-to-date and seem valid options: