Map Controller
Core controller managing map state, rendering, and interactions.
Handles map positioning (zoom, center), tile management, marker rendering, shape drawing, camera animations, and touch event processing.
This class is used internally by OpenMapView and is not part of the public API.
Properties
Functions
Parses GeoJSON and adds all features to the map.
Adds a ground overlay to the map.
Adds a polygon to the map.
Adds a polyline to the map.
Adds a tile overlay to the map.
Animates the camera to a new position.
Animates the camera to a new position with the given timing, e.g. a android.view.animation.LinearInterpolator for constant speed.
Drops a camera update kept by deferBoundsUpdate, e.g. when the camera is set directly, calling onCancel() of its listener.
Removes all circles from the map.
Removes all ground overlays from the map.
Removes all markers from the map.
Removes all polygons from the map.
Removes all polylines from the map.
Drops the downloaded tiles of a tile overlay, so they are requested again.
Removes all tile overlays from the map.
Creates a Projection instance for coordinate conversions.
Draws the custom edge glow effects on the canvas.
Returns the bearing in degrees clockwise from north, 0 to 360.
Returns the current camera position.
Returns a copy of all circles on the map.
Returns a copy of all ground overlays on the map.
Returns the current camera target bounds constraint.
Returns the color scheme of the map, see setMapColorScheme.
Returns a copy of all markers on the map.
Returns the current maximum zoom level preference.
Returns the current minimum zoom level preference.
Returns a copy of all polygons on the map.
Returns a copy of all polylines on the map.
Returns the color filter of the base map tiles, see setTileColorFilter.
Returns a copy of all tile overlays on the map.
Returns how many screen pixels a pixel of a 256 px tile covers, see setTileScale.
Gets the current tile source.
Checks if a touch at screen coordinates hits a clickable circle.
Finds the info window at the specified screen coordinates.
Finds the topmost marker at the specified screen coordinates.
Checks if a touch at screen coordinates hits a clickable polygon.
Checks if a touch at screen coordinates hits a clickable polyline.
Checks if any edge glow is currently active.
Moves the camera instantly to a new position.
Releases all edge glows, allowing them to decay naturally.
Removes a circle from the map.
Removes a ground overlay from the map.
Removes a marker from the map.
Removes a polygon from the map.
Removes a polyline from the map.
Removes a tile overlay from the map.
Resets the min/max zoom preferences to their defaults (2.0 - 19.0).
Converts screen coordinates to geographic coordinates.
Sets the bearing: the direction at the top of the screen, in degrees clockwise from north, e.g. 90 for east up. The map turns around the camera target, which stays in place.
Sets a LatLngBounds to constrain the camera target.
Sets the color scheme of the map, one of the MapColorScheme constants.
Sets map padding that affects the logical viewport.
Sets the map type with API key handling.
Sets the maximum zoom level preference.
Sets the minimum zoom level preference.
Sets whether the device is in night mode, for MapColorScheme.FOLLOW_SYSTEM.
Sets a callback that is invoked once, after a draw in which all visible base map tiles were shown and the camera was not moving. If the map is already fully drawn, the callback is invoked after the next frame. Tile overlays are not waited for, because sparse overlays have no tiles for many areas.
Sets a callback to be invoked when tiles finish loading.
Sets a color filter for the base map tiles and their placeholders, e.g. TileColorFilters.invertedDark for a dark map. Markers, shapes, ground and tile overlays and info windows keep their colors.
Sets how many screen pixels a pixel of a 256 px tile covers.
Sets the UiSettings instance for controlling UI behavior.
Sets the view dimensions for rendering calculations.
Stops any ongoing camera animation.
Triggers the edge glow effect on specified edges.
Updates the temporary pan offset during a drag gesture.