flutter_map_dragmarker
8.0.3, released 2 years ago by an unverified publisher
A draggable marker layer for flutter_map
What it does
Provides a DragMarkers layer and DragMarker class for flutter_map, allowing users to drag map markers around. It supports features like long-press to drag, map scrolling near edges, and marker rotation settings.
AI-written summary of version 8.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using flutter_map and need interactive markers that users can drag across the map.
- You need features like map auto-scrolling when dragging near the edge of the map.
Skip it when
- you are not using flutter_map (e.g. using Google Maps instead).
- Markers only need to be tapped rather than dragged.
Strengths
- Integrates seamlessly with flutter_map.
- Supports long-press activation and edge-scrolling.
Weaknesses
- Tied strictly to the flutter_map ecosystem.
- Documentation outside the basic README example is minimal.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Requires adding the dependency and setting up flutter_map and latlong2.
FlutterMap(
options: MapOptions(center: LatLng(45.5231, -122.6765), zoom: 9),
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
),
DragMarkers(
markers: [
DragMarker(
point: LatLng(45.535, -122.675),
offset: const Offset(0.0, -8.0),
builder: (ctx) => const Icon(Icons.location_on, size: 50),
onDragUpdate: (details, latLng) => print(latLng),
),
],
),
],
)Alternatives
Packages that do the same job and could replace flutter_map_dragmarker.
- google_maps_flutter_web
Web platform implementation of google_maps_flutter.
88Compare - google_maps_flutter_android
Android implementation of the google_maps_flutter plugin.
82Compare - google_maps_flutter_ios
iOS implementation of the google_maps_flutter plugin.
81Compare - mapbox_maps_flutter
Official Mapbox Maps SDK for Flutter to render interactive vector maps.
92Compare
Works with
Packages commonly used together with flutter_map_dragmarker: ones it builds on, ones built on it, and its own family.
- latlong2flutter_map_dragmarker depends on itLightweight Dart library for latitude/longitude calculations.
- flutter_mapflutter_map_dragmarker depends on itPure‑Flutter map client with tile loading, markers, and gestures
- flutter_map_line_editorBuilt on flutter_map_dragmarkerBasic line and polygon editor for flutter_map using drag markers