mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix flutter_map compatibility
This commit is contained in:
parent
4c1ba03d6e
commit
7331e5a24d
1 changed files with 13 additions and 15 deletions
|
@ -29,35 +29,33 @@ class OsmGpsMap extends StatelessWidget {
|
||||||
child: IgnorePointer(
|
child: IgnorePointer(
|
||||||
child: FlutterMap(
|
child: FlutterMap(
|
||||||
options: MapOptions(
|
options: MapOptions(
|
||||||
center: centerLl,
|
initialCenter: centerLl,
|
||||||
zoom: zoom,
|
initialZoom: zoom,
|
||||||
allowPanning: false,
|
interactionOptions: const InteractionOptions(
|
||||||
enableScrollWheel: false,
|
flags: InteractiveFlag.none,
|
||||||
interactiveFlags: InteractiveFlag.none,
|
|
||||||
),
|
),
|
||||||
nonRotatedChildren: [
|
|
||||||
AttributionWidget.defaultWidget(
|
|
||||||
source: "OpenStreetMap contributors",
|
|
||||||
),
|
),
|
||||||
],
|
children: [
|
||||||
layers: [
|
TileLayer(
|
||||||
TileLayerOptions(
|
|
||||||
urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||||
),
|
),
|
||||||
MarkerLayerOptions(
|
MarkerLayer(
|
||||||
markers: [
|
markers: [
|
||||||
Marker(
|
Marker(
|
||||||
width: pinSize,
|
width: pinSize,
|
||||||
height: pinSize,
|
height: pinSize,
|
||||||
point: centerLl,
|
point: centerLl,
|
||||||
anchorPos: AnchorPos.align(AnchorAlign.top),
|
alignment: Alignment.topCenter,
|
||||||
builder: (_) => const Image(
|
child: const Image(
|
||||||
image: AssetImage(
|
image: AssetImage(
|
||||||
"packages/np_gps_map/assets/gps_map_pin.png"),
|
"packages/np_gps_map/assets/gps_map_pin.png"),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
const SimpleAttributionWidget(
|
||||||
|
source: Text("OpenStreetMap contributors"),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue