Skip to content

Instantly share code, notes, and snippets.

@mousebird
Last active July 12, 2016 17:59
Show Gist options
  • Save mousebird/29fdbae4c5244699eda256ef16e11bfe to your computer and use it in GitHub Desktop.
Save mousebird/29fdbae4c5244699eda256ef16e11bfe to your computer and use it in GitHub Desktop.
func createLayer(baseView: MaplyBaseViewController) -> (MaplyQuadImageTilesLayer) {
let precipTileSource = MaplyMultiplexTileSource(sources: tileSources)
// Create a precipitation layer that animates
let precipLayer = MaplyQuadImageTilesLayer(tileSource: precipTileSource!)
precipLayer?.imageDepth = UInt32(tileSources.count)
precipLayer?.animationPeriod = 1.0
precipLayer?.imageFormat = MaplyQuadImageFormat.ImageUByteRed
precipLayer?.numSimultaneousFetches = 4
precipLayer?.handleEdges = false
precipLayer?.coverPoles = false
precipLayer?.shaderProgramName = WeatherShader.setupWeatherShader(baseView)
precipLayer?.fade = 0.5
return precipLayer!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment