Skip to content

Commit

Permalink
bug/#1040_2 - calls to listeners for ScrollEvents in MapView.setExpec…
Browse files Browse the repository at this point in the history
…tedCenter

Impacted class: `MapView`
  • Loading branch information
monsieurtanuki committed Jul 11, 2018
1 parent 84f4d31 commit 205b695
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -1728,9 +1728,16 @@ GeoPoint getExpectedCenter() {
* @since 6.0.0
*/
public void setExpectedCenter(final IGeoPoint pGeoPoint) {
final GeoPoint before = getProjection().getCurrentCenter();
mCenter = (GeoPoint)pGeoPoint;
setMapScroll(0, 0);
resetProjection();
final GeoPoint after = getProjection().getCurrentCenter();
if (!after.equals(before)) {
for (MapListener mapListener: mListners) {
mapListener.onScroll(new ScrollEvent(this, 0, 0));
}
}
invalidate();
}

Expand Down

0 comments on commit 205b695

Please sign in to comment.