Select to view content in your preferred language

Displaying JSON and Client side features on map

155
2
Jump to solution
4 weeks ago
Aeseir
by
Frequent Contributor

I am exploring Flutter SDK and struggling to understand how to instantiate new FeatureLayer using client side Features.

 

Use case is in field a user may load features from their web app (which uses arcgis js) to their map on mobile device. Since its not hosted layer (temp data) data is shared between as simple JSON (web app -> mobile).

They may modify the json prior to loading it to map to suit their needs.

 

How do we handle this scenario? Should I be using FeatureCollectionLayer instead?

0 Kudos
1 Solution

Accepted Solutions
kossiyovo
Esri Contributor

For loading client-side features from a web app into a Flutter app using JSON, you should use FeatureCollectionLayer, not FeatureLayer. FeatureLayer is designed for layers that are hosted on a server.
Since your data is temporary and comes as a JSON payload, FeatureCollectionLayer will allow you to manage and display a collection of client-side features without requiring a hosted source.

Product Engineer II at Esri, Google Developer Expert for Flutter/Dart

View solution in original post

0 Kudos
2 Replies
kossiyovo
Esri Contributor

For loading client-side features from a web app into a Flutter app using JSON, you should use FeatureCollectionLayer, not FeatureLayer. FeatureLayer is designed for layers that are hosted on a server.
Since your data is temporary and comes as a JSON payload, FeatureCollectionLayer will allow you to manage and display a collection of client-side features without requiring a hosted source.

Product Engineer II at Esri, Google Developer Expert for Flutter/Dart
0 Kudos
Aeseir
by
Frequent Contributor

Thank you I thought as much.

0 Kudos