addGeoJsonAsMarkerCollection method
Adds a GeoJSON data buffer as a marker collection.
Parameters
- IN buffer The GeoJSON data buffer to be added as a marker collection.
- IN name The name of the marker collection.
Returns
- The created marker collections
Throws
- An exception if it fails.
Implementation
List<MarkerCollection> addGeoJsonAsMarkerCollection(
final String buffer,
final String name,
) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapView',
'addGeoJsonAsMarkerCollection',
args: <String, String>{'name': name, 'databuffer': buffer},
);
final List<MarkerCollection> pRet = List<MarkerCollection>.empty(
growable: true,
);
for (final int markerCollectionId in resultString['result']) {
pRet.add(MarkerCollection.init(markerCollectionId, 0));
}
return pRet;
}