vector_map
0.7.0, released 5 years ago by caduandrade.net
Pure‑Flutter vector map widget that renders GeoJSON data.
WASM-ready
What it does
It parses GeoJSON strings and displays them as interactive vector maps. The map can be styled, layered, and annotated with markers, legends, and hover effects.
AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a lightweight, fully Flutter‑based map without native SDKs or WebViews
- You want to visualise custom GeoJSON data with custom theming and interactivity
Skip it when
- You require satellite imagery, street maps, or routing features
- You need platform‑specific map SDKs with offline tiles
Strengths
- No native platform dependencies – works on all Flutter targets
- Highly customizable theming and rule‑based styling
- Supports multi‑layer maps and interactive features like hover and click
Weaknesses
- Limited to vector data – no raster tiles or built‑in map providers
- Feature set smaller than full‑featured map SDKs (e.g., no built‑in geocoding)
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:flutter/material.dart';
import 'package:vector_map/vector_map.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
final geoJson = '{"type":"FeatureCollection","features":[]}'; // your GeoJSON string
final source = await MapDataSource.geoJson(geoJson: geoJson);
final layer = MapLayer(dataSource: source);
final controller = VectorMapController();
controller.addLayer(layer);
runApp(MaterialApp(home: Scaffold(body: VectorMap(controller: controller))));
}Alternatives
Packages that do the same job and could replace vector_map.
- flutter_map
Provides raster tile support and extensive plugins for markers, clustering, and offline maps
90Compare - google_maps_flutter
Offers Google Maps tiles, street view, and built‑in place search
90Compare - geolocator
If you only need location services without rendering a map
97Compare