MapViewOverlay
Protocol of the SwiftUI map layer.
func mapViewOverlayGestureView(_ view: (UIView & IMapGestureView)?) -> MapViewOverlay
Additional layer placed above the whole map surface. Used for intercepting gestures. If this layer is replaced with another one, you must also implement sending the map gestures via IMapEventProcessor
. If the nil
value is set, the built-in gesture handling is stopped.
func mapViewOverlayAppearance(_ value: MapAppearance) -> MapViewOverlay
Sets an active theme set of the current style and enables automatic theme switching depending on the environment. If .automatic
is selected, the map switches to the selected theme depending on the current look (light or dark).
func mapViewOverlayShowsAPIVersion(_ value: Bool) -> MapViewOverlay
Whether to show the API version in the copyright. Default value is false
.
func mapViewOverlayCopyrightAlignment(_ alignment: CopyrightAlignment) -> MapViewOverlay
Copyright location.
func mapViewOverlayCopyrightInsets(_ insets: EdgeInsets) -> MapViewOverlay
Margin between the copyright and map borders. Default value is .zero
. During positioning, safeAreaInsets
of the map view are considered. Margin values cannot be negative.
func mapViewOverlayUrlOpener(_ url: ((URL) -> Void)?) -> MapViewOverlay
Custom handler of opening the URL when a user taps the copyright.
Enables redefining the default behavior when following the link is done without user confirmation.
func mapViewOverlayObjectTappedCallback(callback: MapObjectTappedCallback) -> MapViewOverlay
Adds a callback function that is called after a click on the map.
func mapViewOverlayObjectLongPressCallback(callback: MapObjectTappedCallback) -> MapViewOverlay
Adds a callback function that is called after a long click on the map.
func mapViewOverlayRemoveObjectTappedCallback(callback: MapObjectTappedCallback) -> MapViewOverlay
Removes a callback function that is called after a click on the map.
func mapViewOverlayRemoveLongPressCallback(callback: MapObjectTappedCallback) -> MapViewOverlay
Removes a callback function that is called after a long click on the map.
var body
some View
Contents and behavior of the control.