-
- All Implemented Interfaces:
-
org.osmdroid.views.util.constants.OverlayConstants
public abstract class OverlayWithIW extends Overlay
The org.osmdroid.views.overlay.OverlayWithIW is an org.osmdroid.views.overlay.Overlay that contain data title , a snippet or description, and optionally a "sub-description" and that can be shown in a popup-org.osmdroid.views.overlay.infowindow.InfoWindow (a bubble).
Handling tap event and showing the InfoWindow at a relevant position is let to sub-classes.
-
-
Constructor Summary
Constructors Constructor Description OverlayWithIW(Context ctx)
Use OverlayWithIW instead OverlayWithIW()
-
Method Summary
Modifier and Type Method Description void
setTitle(String title)
String
getTitle()
void
setSnippet(String snippet)
String
getSnippet()
void
setSubDescription(String subDescription)
set the "sub-description", an optional text to be shown in the InfoWindow, below the snippet, in a smaller text size String
getSubDescription()
void
setRelatedObject(Object relatedObject)
Allows to link an Object (any Object) to this marker.This is particularly useful to handle custom InfoWindow. Object
getRelatedObject()
void
setId(String id)
Allows to set a user-defined id. String
getId()
void
setInfoWindow(InfoWindow infoWindow)
By default, OverlayWithIW has no InfoWindow. InfoWindow
getInfoWindow()
void
closeInfoWindow()
void
onDestroy()
boolean
isInfoWindowOpen()
-
Methods inherited from class org.osmdroid.views.overlay.Overlay
draw, draw, getBounds, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
OverlayWithIW
OverlayWithIW(Context ctx)
Use OverlayWithIW instead
-
OverlayWithIW
OverlayWithIW()
-
-
Method Detail
-
setSnippet
void setSnippet(String snippet)
-
getSnippet
String getSnippet()
-
setSubDescription
void setSubDescription(String subDescription)
set the "sub-description", an optional text to be shown in the InfoWindow, below the snippet, in a smaller text size
-
getSubDescription
String getSubDescription()
-
setRelatedObject
void setRelatedObject(Object relatedObject)
Allows to link an Object (any Object) to this marker.This is particularly useful to handle custom InfoWindow.
-
getRelatedObject
Object getRelatedObject()
-
setId
void setId(String id)
Allows to set a user-defined id. Example: when drawing KML objects, can be the KML id.
- Parameters:
id
- the user-defined id, as a String.
-
setInfoWindow
void setInfoWindow(InfoWindow infoWindow)
By default, OverlayWithIW has no InfoWindow.Usage: setInfoWindow(new BasicInfoWindow(layoutResId, mapView));
- Parameters:
infoWindow
- the InfoWindow to be opened when tapping the overlay.This InfoWindow MUST be able to handle an OverlayWithIW (as BasicInfoWindow does).Set it to null to remove an existing InfoWindow.
-
getInfoWindow
InfoWindow getInfoWindow()
-
closeInfoWindow
void closeInfoWindow()
-
onDestroy
void onDestroy()
-
isInfoWindowOpen
boolean isInfoWindowOpen()
-
-
-
-