You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into a very strange issue where saved markers are appearing as they should, but when I add a new marker into the marker list, the new marker either does not appear, or every single marker fails to appear.
This is the code I run when I switch between modes with my choicebox. When I first run the program, I load saved LatLongs into the Marker List. Markers disappear and appear perfectly fine when I switch between modes.
However, when I run a method that adds a Post, which adds a marker to the JournalMarkerList or the GoalMarkerList, they fail to load on my map. Even if I switch between modes with the code above, they still fail to load. I have checked that the new Marker is in the Marker List. The strange thing is that, the way I'm adding a Marker when I make a post, and the way I'm adding a Marker when I'm loading saved Markers, is exactly the same, so I don't understand why one is appearing and the other is not.
Here is my MarkerList class :
public Marker makeNewMarker(LatLong loc) {
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(loc);
Marker marker = new Marker(markerOptions);
return marker;
}
public void addJournalMarkerList(LatLong loc) {
Marker marker = makeNewMarker(loc);
journalMarkerList.add(marker);
}
public void addGoalMarkerList(LatLong loc) {
Marker marker = makeNewMarker(loc);
goalMarkerList.add(marker);
}
public ArrayList<Marker> getJournalMarkerList() {
return journalMarkerList;
}
public ArrayList<Marker> getGoalMarkerList() {
return goalMarkerList;
}
}
The text was updated successfully, but these errors were encountered:
I am running into a very strange issue where saved markers are appearing as they should, but when I add a new marker into the marker list, the new marker either does not appear, or every single marker fails to appear.
This is the code I run when I switch between modes with my choicebox. When I first run the program, I load saved LatLongs into the Marker List. Markers disappear and appear perfectly fine when I switch between modes.
However, when I run a method that adds a Post, which adds a marker to the JournalMarkerList or the GoalMarkerList, they fail to load on my map. Even if I switch between modes with the code above, they still fail to load. I have checked that the new Marker is in the Marker List. The strange thing is that, the way I'm adding a Marker when I make a post, and the way I'm adding a Marker when I'm loading saved Markers, is exactly the same, so I don't understand why one is appearing and the other is not.
Here is my MarkerList class :
}
The text was updated successfully, but these errors were encountered: