layers property

List<MapLayer> layers

The collection of map shape layer in which geographical rendering is done.

The snippet below shows how to render the basic world map using the data from .json file.

 Widget build(BuildContext context) {
   return SfMaps(
     layers: [
         source: MapShapeSource.asset(
             shapeDataField: "name",

See also:

  • MapShapeLayer.source, to provide data for the elements of the SfMaps like data labels, bubbles, tooltip, shape colors, and legend.


final List<MapLayer> layers;