Add Markers
This example demonstrates how to create a Flutter app that displays a large number of markers on a map using Maps SDK for Flutter.
Saving Assets
Before running the app, ensure that you save the necessary files (marker icons) into the assets directory.
Update your pubspec.yaml file to include these assets:
flutter:
assets:
- assets/
How It Works
The example app demonstrates the following features:
- Display a large number of markers on the map.
GemMap widget
UI and Map Integration
This code sets up the basic structure of the app, including the map and the app bar, and initializes the map when it is created.
Adding and displaying Markers
This code creates and adds a large number of markers to the map, generating random coordinates across Europe for demonstration purposes. It loads PNG images from assets to be used as marker icons.