Yarrow Map Flutter SDK
Flutter SDK for integrating Yarrow maps in mobile apps, with an API aligned to the Yarrow web SDK.
Features
- Render Yarrow map tiles via
YarrowMapView. - Programmatic map control with
YarrowMapControllerandYarrowMap. - Add/remove custom layers and markers.
- Route building and route rendering helpers.
- Search highlighting and live bus route rendering helpers.
Installation
dependencies:
yarrow_map_flutter_sdk: ^0.0.3
Then run:
flutter pub get
Quick Start
import 'package:flutter/material.dart';
import 'package:yarrow_map_flutter_sdk/yarrow_map_flutter_sdk.dart';
class MapScreen extends StatefulWidget {
const MapScreen({super.key});
@override
State<MapScreen> createState() => _MapScreenState();
}
class _MapScreenState extends State<MapScreen> {
final controller = YarrowMapController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: YarrowMapView(
config: const YarrowMapConfig(
center: (lng: 69.2401, lat: 41.2995),
zoom: 12,
),
controller: controller,
onReady: (map) async {
await map.zoomTo(41.2995, 69.2401, 14);
},
),
);
}
}
Notes
- This package uses
maplibre_glunder the hood. - Ensure platform setup for Flutter + MapLibre is completed in your app.