Created
August 25, 2016 06:36
-
-
Save mbalex99/c682bb973bb4b1477251e6d1d6f93a40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Annotation { | |
interface AnnotationLatLngChange { | |
onChange(LatLng latLng); | |
} | |
AnnotationLatLngChange changeHandler; | |
LatLng getLatLng(); | |
void setLatLng(); | |
} | |
class BoatAnnotation implements Annotation { | |
private LatLng mLatLng; | |
AnnotationLatLngChange changeHandler; | |
@Override | |
public void setLatLng(LatLng newLatLng){ | |
this.mLatLng = newLatLng; | |
//optional but recommended | |
if(this.changeHandler != null){ | |
changeHandler.onChange(newLatLng); | |
} | |
} | |
@Override LatLng getLatLng(){ | |
return this.mLatLng | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment