Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retina annotations #18

Open
fousa opened this issue Oct 19, 2012 · 1 comment
Open

Retina annotations #18

fousa opened this issue Oct 19, 2012 · 1 comment

Comments

@fousa
Copy link

fousa commented Oct 19, 2012

Hi,

Is it possible to get the retina images working. I added an @2x version of the image to the project. But when I'm on my retina Mac I always get the annotations with double the size....

Any idea how I can fix this?

@jeffsawatzky
Copy link

I don't have a mac with a retina display, so I can't try this, but have you tried the following:

  1. In your targets build settings, set "Combine High Resolution Artwork" to no
  2. Load your images like so (assuming you have images named pin.png and pin@2x.png):
    NSString * imageUrl = [[[NSBundle mainBundle] URLForImageResource:@"pin"] absoluteString];
    view.imageUrl = imageUrl;

I noticed that when I had "Combine High Resolution Images" set to YES, the two images would be combined into a multipage tiff file, with the high resolution image set as the first page. Then when the tiff was loaded in the map, it would only show the first page, which was the high resolution one, and I don't have a retina display so the pins were huge. Setting "Combine High Resolution Images" to NO keeps them as separate pngs, and URLForImageResource:@"pin" should in theory return the correct image depending on whether you have a retina display or not. But again, I don't have a retina display so I can't confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants