You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
The use case I am envisioning is a slider that allows heat map (or cloud cover) overlay transparency to be dialed up or down based upon user input. With multiple overlays, the primary data being analyzed can become opaque, and the secondary overlays made semi-transparent.
Yeah as @wsnook pointed out, as of iOS 7 / MKTileOverlay & the new renderer system, the performance here would likely not be as desired.
However, even if you went to all that trouble, the kind of maximum refresh rate you'd be looking at would likely be a really glitchy 1/2 frame per second or something similarly terrible.
Things are done a tile at a time, and although you can setNeedsDisplayInMapRect:, the actual refreshes are then done on a tile-by-tile basis, drawn into a Core Graphics context as opposed to manipulating a UIView directly. So you won't get the smooth, layer-wide effect that you want. The same issue affects potentially using custom vector rendering in an overlay.
Presets can balloon the size of the app - recreating the same mbtile file multiple times with a different alpha channel. I'm going to do a few experiments, and file a radar. I'll post here if I discover any interesting tricks.
I think it might be worth splitting into two different features - changing the alpha layer is a much more important and much more common use case than smoothly animating it.
Being able to set a layer to 25% or 50% transparency enables a lot of functionality even without being able smoothly fade it in and out.
Activity
radven commentedon Feb 20, 2014
The use case I am envisioning is a slider that allows heat map (or cloud cover) overlay transparency to be dialed up or down based upon user input. With multiple overlays, the primary data being analyzed can become opaque, and the secondary overlays made semi-transparent.
incanus commentedon Feb 20, 2014
Yeah as @wsnook pointed out, as of iOS 7 /
MKTileOverlay& the new renderer system, the performance here would likely not be as desired.Things are done a tile at a time, and although you can
setNeedsDisplayInMapRect:, the actual refreshes are then done on a tile-by-tile basis, drawn into a Core Graphics context as opposed to manipulating aUIViewdirectly. So you won't get the smooth, layer-wide effect that you want. The same issue affects potentially using custom vector rendering in an overlay.Presets and filing a Radar seem like good bets. Or else using http://github.com/mapbox/mapbox-ios-sdk, which does this now :-)
radven commentedon Feb 21, 2014
Presets can balloon the size of the app - recreating the same mbtile file multiple times with a different alpha channel. I'm going to do a few experiments, and file a radar. I'll post here if I discover any interesting tricks.
incanus commentedon Mar 5, 2014
I've moved it out of the milestone. Let's keep it around and think about options down the road. Ok to punt on it later if it proves nigh impossible.
radven commentedon Mar 5, 2014
I think it might be worth splitting into two different features - changing the alpha layer is a much more important and much more common use case than smoothly animating it.
Being able to set a layer to 25% or 50% transparency enables a lot of functionality even without being able smoothly fade it in and out.
Thoughts?
incanus commentedon Aug 27, 2014
Gonna defer this to GL.