Select to view content in your preferred language

Get the UIView representing my layer after calling addMapLayer:withName on AGSMapView?

2630
2
Jump to solution
10-31-2014 09:05 AM
JamesPower1
Deactivated User

In older versions of the SDK AGSMapView's addMapLayer:withName returned a UIView<AGSMapLayer> (or some similarly named protocol) but in the newer version of the SDK that method returns void.

My use case is this: I'd like to have the UIView for that layer to adjust its transparency arbitrarily at runtime. Maybe this isn't the most effective way to do this. Is there a better way to adjust the transparency, or barring that, is there a way to retrieve the UIView created after I call addMapLayer:withName?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

The current version of the ArcGIS Runtime SDK does not return a UIVIew as you already experience, to change the transparency, there is a property call opacity per layer that allows you to do that.

  • Control how transparent or opaque a layer is, using the opacity properties.

10.2.4: AGSLayer Class Reference

Hope this helps

Cheers

Al

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

The current version of the ArcGIS Runtime SDK does not return a UIVIew as you already experience, to change the transparency, there is a property call opacity per layer that allows you to do that.

  • Control how transparent or opaque a layer is, using the opacity properties.

10.2.4: AGSLayer Class Reference

Hope this helps

Cheers

Al

0 Kudos
JamesPower1
Deactivated User

I have no idea how I missed this, I thought I searched the header specifically for 'opacity' - apparently not! In my defense I was having a very rough Friday.

Thanks!