I noticed when on a retina display the source map is @2x but it exports a @1x.
I don't know enough about how canvas works but using this plugin would it be possible to output an @2x image?
thanks for your work on this it's great.
Yes, though right now I'm pausing all development since #8 is a blocker for this being useful.
@tmcw Could you point me in the right direction to get retina support going?
The canvas would be 2x as large, and you would scale the Point and tileSize math by 2.
@tmcw Got it, thanks!
first off thanks for the tips about this.
I'm trying to implement the above, but I have a few questions. I am quite new to tiles, so apologies if these are dumb questions.
My understanding is that for a retina image, we need to display the same map but with double the amount of pixels - which is the reason for making the canvas 2x as large, which I have done.
I have tried a couple of ways of getting the higher resolution image, but with only limited success so far:
1 - change tileSize to 512 and adjust the tile calculations accordingly. If this is the correct approach, do I need to adjust the map bounds (from map.getPixelBounds()) or the tileJson bounds (https://github.com/mapbox/leaflet-image/blob/gh-pages/index.js#L70-L72) ?
You also mentioned that the Point math needs to be scaled by 2 - is that in the following lines:
2 - For each tile that is requested, is it also possible to request 4 tiles at next higher zoom level? This would create problems at the highest zoom level though so I guess it may not be a good option.
Anway, if it's possible to get a few more pointers on which values need adjusting it would be greatly appreciated. I'd be happy to contribute some work back into the project once I have it working.
thanks for any assistance you can provide!