Multiview Map
In this guide, you will learn how to display multiple interactive maps in one viewport.
How It Works
This example demonstrates the following features:
- Display multiple map views in a grid layout, each independently interactive with features like panning and zooming.
Initial empty viewport
Four different interactive maps
Creating the Grid of Maps
A GridView is used to create a grid with a maximum of 2 map views per row. Each map view is created by GemMap() and enclosed in a Container as a grid element.
Managing the Number of Map Views
The number of interactive map views (initially zero) to display is stored in _mapViewsCount and can be increased or decreased interactively by the user using the functions shown above.
Each map is a separate view and can be panned/zoomed independently of the others.