开发者

I am using CATiledLayer and UIScrollView, how can I dynamically set CATiledLayer properties?

Basically speaking I am making a map framework (like Route-me and Google Maps). I want to change some properties of CATiledLayers which are not documented. So I dont know if it is possible:

I want to dynamically set properties of CATiledLayer, such as layer size, tile numbers, what conditions to trigger rel开发者_Python百科oading tile source, and binding a function when CATiledLayer realoding sources?


Not sure why you would think that it is not documented, aren't you referring to the things below?

Dynamically set properties of CATiledLayer, such as layer size, tile numbers

  tiledLayer.levelsOfDetail = ...
  tiledLayer.levelsOfDetailBias = ...
  tiledLayer.frame = ...

What conditions to trigger reloading tile source -> You should be able to call -setNeedsDisplay to trigger reload when you want to.

Binding a function when CATiledLayer realoding sources -> Implement -drawLayer:inContext: in a delegate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜