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

Tile overlay, rebased #595

Merged
merged 6 commits into from
Sep 21, 2016
Merged

Tile overlay, rebased #595

merged 6 commits into from
Sep 21, 2016

Conversation

spikebrehm
Copy link

This is #143, but rebased off of latest master. There were a bunch of conflicts.

Thanks @cascadian for doing the original work!

iOS

screen shot 2016-09-20 at 3 04 03 pm

Android

screen shot 2016-09-20 at 3 03 46 pm

What I don't understand is how, in this example using the Stamen watercolor tiles:

http://c.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg

The iOS tiles appear much more high-res than Android. Oh... maybe it's just a pixel density thing on the emulators? That would make sense.

cc: @christopherdro @lelandrichardson @jrichardlai

@spikebrehm spikebrehm mentioned this pull request Sep 20, 2016
@spikebrehm spikebrehm merged commit ba456db into master Sep 21, 2016
@spikebrehm spikebrehm deleted the TileOverlayRebased branch September 21, 2016 20:27
private TileOverlayOptions createTileOverlayOptions() {
TileOverlayOptions options = new TileOverlayOptions();
options.zIndex(zIndex);
this.tileProvider = new AIRMapUrlTileProvider(256, 256, this.urlTemplate);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sizes must not be hardcoded, but used as a parameter. Because retina tiles could be 512x512 and bigger.

{
if (!_urlTemplateSet) return;
self.tileOverlay = [[MKTileOverlay alloc] initWithURLTemplate:self.urlTemplate];
self.tileOverlay.canReplaceMapContent = YES;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we need a way to specify the tiles size:

self.tileOverlay.tileSize = CGSizeMake(512, 512);
self.tileOverlay.maximumZ = 18;

@alexHlebnikov
Copy link

@spikebrehm I think wee need to add a param for tile sizes.

@spikebrehm
Copy link
Author

@alexHlebnikov good call! Would you be able to create a PR for this?

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

Successfully merging this pull request may close these issues.

3 participants