Ground Overlay
An image placed on the map, e.g. a historic map or a floor plan, that scales with the map.
It is placed either at a position with a width (and optional height) in meters, or stretched over bounds.
The overlay is a live handle, as returned by OpenMapView.addGroundOverlay: setting a property, e.g. overlay.bearing = 45f, redraws the map right away, setPosition, setDimensions and setPositionFromBounds move it, and remove takes it off the map. Java code uses the getters and setters, e.g. overlay.setTransparency(0.5f).
Parameters
The image to draw
The location of the anchor, used with width; null when placed by bounds
The width in meters, used with position
The height in meters; null keeps the image's aspect ratio
The area the image is stretched over; null when placed by position
The point of the image at position, from (0, 0) top left to (1, 1) bottom right
The clockwise rotation in degrees around the anchor
From 0 (opaque) to 1 (invisible)
Whether the overlay is drawn
Draw order: overlays with a higher zIndex are drawn on top
Whether a tap on the overlay is reported to its click listener
Optional user data
Constructors
Properties
Functions
Returns a new overlay with the given properties changed, not added to any map.
Sets the width in meters and keeps the image's aspect ratio.
Sets the size in meters, or keeps the image's aspect ratio for a null height. An overlay placed by bounds is placed at their center instead.
Moves the overlay, so its anchor is at position. An overlay placed by bounds keeps the width of those bounds, measured at their center.
Stretches the image over bounds, replacing the position and size.