GroundImageState
GroundImageState
Section titled “GroundImageState”GroundImageState is an ObservableObject used by GroundImage(state:).
Use it when the image, opacity, geographic bounds, or click handler changes at runtime.
Public Properties
Section titled “Public Properties”id: Stringbounds: GeoRectBoundsimage: UIImageopacity: DoubletileSize: Intextra: Any?onClick: OnGroundImageEventHandler?
let bounds = GeoRectBounds( southWest: GeoPoint(latitude: 35.67, longitude: 139.74), northEast: GeoPoint(latitude: 35.69, longitude: 139.76))
let groundImageState = GroundImageState( bounds: bounds, image: UIImage(named: "overlay")!, opacity: 0.5)
GroundImage(state: groundImageState)
groundImageState.opacity = 1.0Repositioning
Section titled “Repositioning”Update bounds to move or resize the image:
groundImageState.bounds = GeoRectBounds( southWest: GeoPoint(latitude: 35.66, longitude: 139.73), northEast: GeoPoint(latitude: 35.70, longitude: 139.77))Update image when the displayed raster changes. Use tileSize to control the tile size used by the overlay renderer.