-
- All Implemented Interfaces:
-
org.osmdroid.views.util.constants.OverlayConstants
public class CopyrightOverlay extends Overlay
CopyrightOverlay - uses the getCopyrightNotice text to paint on the screen Original sourceIssue 501Open Street Map's guidance on attributioncreated on 1/2/2017.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanalignBottomprotected booleanalignRight
-
Constructor Summary
Constructors Constructor Description CopyrightOverlay(Context context)
-
Method Summary
Modifier and Type Method Description voidsetAlignBottom(boolean alignBottom)voidsetAlignRight(boolean alignRight)voidsetTextSize(int fontSize)voidsetTextColor(int color)voidsetOffset(int x, int y)Sets the screen offset. voiddraw(Canvas canvas, MapView map, boolean shadow)Draw the overlay over the map. voiddraw(Canvas canvas, Projection pProjection)voidsetCopyrightNotice(String pCopyrightNotice)-
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
-
CopyrightOverlay
CopyrightOverlay(Context context)
-
-
Method Detail
-
setAlignBottom
void setAlignBottom(boolean alignBottom)
-
setAlignRight
void setAlignRight(boolean alignRight)
-
setTextSize
void setTextSize(int fontSize)
-
setTextColor
void setTextColor(int color)
-
setOffset
void setOffset(int x, int y)
Sets the screen offset. Values are in real pixels, not dip
- Parameters:
x- horizontal screen offset, if aligh right is set, the offset is from the right, otherwise lifty- vertical screen offset, if align bottom is set, the offset is pixels from the bottom (not the top)
-
draw
void draw(Canvas canvas, MapView map, boolean shadow)
Draw the overlay over the map. This will be called on all active overlays with shadow=true,to lay down the shadow layer, and then again on all overlays with shadow=false. Callersshould check isEnabled() before calling draw(). By default, draws nothing.
changed for 5.6 to be public see https://github.com/osmdroid/osmdroid/issues/466If possible, use draw instead (cf. MapSnapshot
-
draw
void draw(Canvas canvas, Projection pProjection)
-
setCopyrightNotice
void setCopyrightNotice(String pCopyrightNotice)
-
-
-
-