org.osmdroid.events.ScrollEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of osmdroid-android Show documentation
Show all versions of osmdroid-android Show documentation
An Android library to display OpenStreetMap views.
package org.osmdroid.events;
import org.osmdroid.views.MapView;
/*
* The event generated when a map has finished scrolling to the coordinates (x
,y
).
*
* @author Theodore Hong
*/
public class ScrollEvent implements MapEvent {
protected MapView source;
protected int x;
protected int y;
public ScrollEvent(final MapView source, final int x, final int y) {
this.source = source;
this.x = x;
this.y = y;
}
/*
* Return the map which generated this event.
*/
public MapView getSource() {
return source;
}
/*
* Return the x-coordinate scrolled to.
*/
public int getX() {
return x;
}
/*
* Return the y-coordinate scrolled to.
*/
public int getY() {
return y;
}
@Override
public String toString() {
return "ScrollEvent [source=" + source + ", x=" + x + ", y=" + y + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy