AnsweredAssumed Answered

iOS - How to add UI elements on top of AGSMapView

Question asked by recreationaltech.com on Sep 17, 2019
Latest reply on Sep 18, 2019 by recreationaltech.com

I'm using iOS 100.6 and am trying to place a UIbutton on top of AGSMapView. In the View Controller MapView and the UIButton are under "View". The UIbutton is not a subview of MapView. How do I get other UI element in my view to be visible on top of the map. I have three other elements that I hide and unhide using "isHidden = true/false" and these cannot be displayed either. Code in Swift 4.2.

Here is the view:

View Controller "View"

Here is the code snippet:

let viewMap = AGSMapView(frame: .zero)

viewMap.map = AGSMap(basemapType: .navigationVector,

                                         latitude: currentLocation.latitude, longitude: currentLocation.longitude,

                                         levelOfDetail: zoomLevel)

viewMap.graphicsOverlays.add(overlay)

viewMap.touchDelegate = self

view = viewMap

view.bringSubviewToFront(btnSatelliteToggle)

 

Outcomes