Quick Start
A map with a marker, a polyline and a compass button, on every platform:
import 'package:flutter/material.dart';
import 'package:flutter_unified_map/flutter_unified_map.dart';
class MapScreen extends StatelessWidget {
const MapScreen({super.key, required this.controller});
final UnifiedMapController controller;
@override
Widget build(BuildContext context) {
final paris = LatLng(48.8566, 2.3522);
return UnifiedMap(
mapController: controller,
options: MapOptions(initialCenter: paris, initialZoom: 6),
children: [
MarkerLayer(
markers: [
Marker(point: paris, iconKey: 'pin', child: const Pin()),
],
),
PolylineLayer(
polylines: [
Polyline(
points: [paris, LatLng(48.85, 2.4)],
color: Colors.blue,
strokeWidth: 5,
borderStrokeWidth: 2,
borderColor: Colors.white,
),
],
),
Positioned(right: 12, bottom: 12, child: CompassButton()),
],
);
}
}
What happens per platform:
- Android: Google Maps renders the map; your widgets are rasterised once per
iconKeyand handed to the SDK as bitmaps. - iOS / macOS: Apple MapKit renders the map, same rasterised markers.
- Web / Windows / Linux / tests: flutter_map draws everything, including your marker widgets as real widgets.
Moving the camera
await controller.move(LatLng(48.8566, 2.3522), zoom: 12);
MapCamera exposes center, zoom, rotation (continuous, same meaning as flutter_map on every backend) and the
pixel dimensions, so existing flutter_map code that reads the camera ports directly.
What runs where
STATUS.md in the repository lists what has been verified per platform and the known limitations. When something
behaves differently between backends, that file is the source of truth.