Skip to content

Commit

Permalink
Narrowed down source of issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
urmilshroff committed Dec 2, 2019
1 parent 11e7389 commit 3f90a34
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/pages/map_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class _MyMapViewPageState extends State<MyMapViewPage> {
var locationAnimation = 0; // used to switch between 2 kinds of animations
var previousMarkersWithinRadius = 0;
var currentMarkersWithinRadius = 0;
var allMarkersWithinRadius = [];

final zoom = [15.0, 17.5]; // zoom levels (0/1)
final bearing = [0.0, 90.0]; // bearing level (0/1)
Expand Down Expand Up @@ -137,7 +136,7 @@ class _MyMapViewPageState extends State<MyMapViewPage> {

hotspots.clear();
markers.clear();
allMarkersWithinRadius.clear();
currentMarkersWithinRadius = 0;
// clearing lists needed to regenerate necessary markers

for (int i = 0; i < clients.length; i++) {
Expand Down Expand Up @@ -290,10 +289,11 @@ class _MyMapViewPageState extends State<MyMapViewPage> {
}

if (hotspotRadius >= myMarkerDistance) {
allMarkersWithinRadius
.add(markerId); // contains markers near my marker
currentMarkersWithinRadius += 1; // no. of markers near my marker
isMarkerWithinRadius = true;
}
} // TODO: fix this ffs!
// this is the source of issue #11
// see https://github.com/fliverdev/rider/issues/11

if (isMarkerWithinRadius) {
if (documentId == widget.identity) {
Expand All @@ -317,7 +317,6 @@ class _MyMapViewPageState extends State<MyMapViewPage> {
} // adds markers within 5km of my marker
});
}
currentMarkersWithinRadius = allMarkersWithinRadius.length;
isMarkerWithinRadius = false;
isMarkerDeleted = false;
}
Expand Down

0 comments on commit 3f90a34

Please sign in to comment.