v8.0.3
flutter_map_dragmarker
flutter_map용 Dragmarker 클래스
33좋아요 1.4만30일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
flutter_map용 드래그 마커
{"sdk":"flutter"}^8.0.0>=0.9.0 <0.11.0>=1.0.4{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A drag marker for flutter_map.
See the example/lib/main.dart for usage, but the included example below in this file should show pretty much everything.
offset and dragOffset are there for tweaking icon/images if they should
not get displayed centered.height is mainly for Images, use Icon(..., size: ...), but be aware
internal calculations are based on size.rotateMarker toggles the markers' rotation on and off. True keeping markers
upright.scrollMapNearEdge if the map should scroll when a marker is dragged
near the edge.useLongPress if you want to enable dragging after a long press 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),
),
],
),
],
),
It may be interesting to move the map alternately to marker, too. So the marker stays in place, but then technically you aren't dragging anymore, so thoughts welcome.