Closed MTRNord closed 2 years ago
Duplicate of #26
Sorry, I cannot reproduce this issue. How do you build the map? And what API level of android are you using?
I have tested the following code in API 28 and API30, only one dialog pop up.
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
import 'package:latlong2/latlong.dart';
class OldStyleExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Old Style Example'),
),
body: FlutterMap(
options: MapOptions(
center: LatLng(0, 0),
zoom: 1,
maxZoom: 19,
plugins: [
const LocationMarkerPlugin(),
],
),
layers: [
TileLayerOptions(
urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
subdomains: ['a', 'b', 'c'],
maxZoom: 19,
),
LocationMarkerLayerOptions(
marker: DefaultLocationMarker(
color: const Color(0xFFDE9D1D).withOpacity(0.5),
),
accuracyCircleColor: const Color(0xFFDFD772).withOpacity(0.5),
headingSectorColor: const Color(0xFFDFD772).withOpacity(0.5),
),
],
),
);
}
}
Are you re-building the FlutterMap
each frame? For there is some internal data stored in the marker layer, it may cause this kind of problem if you re-build it each frame.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Hi I have
in my layers.
If my phone has gps disabled this layer causes thousands of "please enable gps" popus to show up. Removing the layer fixes this.
Any idea why this may happen?
https://user-images.githubusercontent.com/1374914/170100135-e0d13f50-860c-4891-87e3-a069e0c26182.mp4