Questions tagged [catiledlayer]

A tiled layer is a Core Animation layer which divides its drawing area into equal, rectangular areas which are drawn separately. It can be used to display very large contents in a space-saving way in a scrollview. It also allows different levels of detail depending on the current zoom level.

CATiledLayer is a subclass of providing a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.

As more data is required by the renderer, the layer's drawLayer:inContext: method is called on one or more background threads to supply the drawing operations to fill in one tile of data. The clip bounds and current transformation matrix of the drawing context can be used to determine the bounds and resolution of the tile being requested.

163 questions
99
votes
1 answer

GMSGroundOverlay animating - should I be using a CATiledLayer?

I am experimenting with the Google Maps for iOS SDK latest version 1.2.1.2944 to animate a GMSGroundOverlay. The user has control over the image sequence, so using an animated UIImage isn't a possibility sadly, so i'm loading in the UIImage on the…
RobWhistler
  • 1,023
  • 1
  • 7
  • 6
27
votes
2 answers

CATiledLayer PDF Performance is Poor on iPad 3 Retina Display

I'm using rather straightforward code to display a zoomable PDF in a scrollview, and it has been working beautifully on the iPad 2 and the original iPad. But it's staggeringly slow on the iPad 3. I know I'm pushing more pixels, but the rendering…
dkmp
  • 367
  • 4
  • 11
20
votes
2 answers

What is the secret behind "contentScaleFactor" of UIView when used with CATiledLayer?

Greetings, I'm working on an application inspired by the "ZoomingPDFViewer" example that comes with the iOS SDK. At some point I found the following bit of code: // to handle the interaction between CATiledLayer and high resolution // screens, we…
BastiBen
  • 19,679
  • 11
  • 56
  • 86
14
votes
3 answers

Are tile overlays possible with the iPhone's MapKit

I already have a tile source set up for use with the Google Maps JavaScript API. I am trying to translate this for use with the iPhone MapKit. I have correctly implemented the javascript zooming levels into mapkit. Whenever -…
rickharrison
  • 4,867
  • 4
  • 35
  • 40
13
votes
5 answers

CATiledLayer blanking tiles before drawing contents

All, I'm having trouble getting behavior that I want from CATiledLayer. Is there a way that I can trigger the tiles to redraw without having the side-effect that their areas are cleared to white first? I've already subclassed CATiledLayer to set…
Greg Plesur
  • 131
  • 1
  • 5
13
votes
1 answer

Any way to encode a PNG faster than UIImagePNGRepresentation?

I'm generating a bunch of tiles for CATiledLayer. It takes about 11 seconds to generate 120 tiles at 256 x 256 with 4 levels of detail on an iPhone 4S. The image itself fits within 2048 x 2048. My bottleneck is UIImagePNGRepresentation. It takes…
Luke
  • 13,678
  • 7
  • 45
  • 79
12
votes
3 answers

Preload/predisplay tiles in a CATiledLayer?

On the iPhone (though I imagine it's an equally valid question in Cocoa) I have a UIScrollView around a UIView backed by a CATiledLayer. The way it works by default is to load any uncached/unfetched tiles when my viewport scrolls over a blank…
jemmons
  • 18,605
  • 8
  • 55
  • 84
10
votes
4 answers

CATiledLayer in iPad retina simulator yields poor performance

I'm hoping maybe this is just an issue with the simulator but of course it has me worried since I have already submitted my retina capable apps and there's no way to test it until the 16th. I have implemented a CATiledLayer in my app to view very…
Brodie
  • 3,526
  • 8
  • 42
  • 61
10
votes
5 answers

Unwanted scrolling when animating zoomScale in UIScrollView

Executive Summary: At times UIScrollView makes an unwanted change to the value of contentOffset, thus causing the app to display the wrong location in the document being viewed. The unwanted change happens in conjunction to an animated change to…
DirkMaas
  • 101
  • 1
  • 8
10
votes
2 answers

Using NSString's drawAtPoint method in place of CGContextShowGlyphsAtPoint problems

In my app I'm trying to render text along a path; this is fine for most characters but not for Japanese (or anything non mac-Roman). I've been advised to use [NSString drawAtPoint] which displays the correct characters in my CATiledLayer; however,…
davbryn
  • 7,156
  • 2
  • 24
  • 47
9
votes
2 answers

CATiledLayer to CALayer

I have a view with a CATiledLayer backing. I want to take the visible tiles from this CATiledLayer UIView and add it to another view as its CALayer backing, thus recreating the visible image in another UIView that doesnt use CATiledLayer. The reason…
GWed
  • 15,167
  • 5
  • 62
  • 99
8
votes
2 answers

android: how to load and display large images(A0 size) - like google map did?

I have to load and display some very large images, some have size A0(33.1 × 46.8 inches) .I did follow the way Google map display map by split the image in to may tile( size 128x128 pixel) in difference zoom levels ( for zooming in/out) and load…
Anh Nguyen
  • 413
  • 4
  • 15
8
votes
1 answer

Generating dynamic tiles for CATiledLayer

I've seen the WDC2010 Session 104 for using scrollviews and CATiledLayers, which is all pretty cool. But I'm not sure about the generation of the tile images. The example had the frog tile pictures already created. But if I have a photo app where I…
therealtkd
  • 385
  • 3
  • 9
8
votes
3 answers

Why is this CATiledLayer/PDF code slow?

Here is the code: https://www.dropbox.com/s/o42wy36x4qhrbpt/PDFScroller.zip I took the WWDC 2010 PhotoScroller sample code that implements nested UIScrollViews for zooming, inside a UIScrollView for paging, and swapped out what I thought would be…
jbm
  • 1,482
  • 11
  • 26
7
votes
3 answers

Using CATiledLayer, thin line between Tiles on rendering, tiles generated with ImageMagick

Using the PhotoScroller example by Apple and ImageMagick I managed to build my catalog app. But I'm having a rendering bug. The tiled images are rendered with a thin line between them. My simple script using ImageMagick is…
Douglas Schmidt
  • 368
  • 1
  • 2
  • 12
1
2 3
10 11