Predefined Zoom Level

Aug 15, 2014 at 2:31 PM
Hi there,

I'd like to use EPSG:3857 Predefined Zoom Level.

I can see that Brutile.Predefined.Schema.Resolutions contains every resolutions that I want.

Is there a property or another way to specify that the tiles are available only on those resolutions ? For now the graphic engine resizes/stretches the tiles thus making them a bit blurry and that's what I'd like to avoid ...

Thanks !
Coordinator
Aug 15, 2014 at 8:18 PM
You could use Predefined.GlobalSphericalMercator to specify the range of resolutions that you want to use with MinZoomLevel and MaxZoomLevel.

https://brutile.codeplex.com/SourceControl/latest#Tests/BruTile.Tests/Predefined/GlobalSphericalMercatorTests.cs

In some clients you also need to set the min and max resolution of the TileLayer itself, otherwise it will still stretch whatever tiles are available. What client do you use?
Aug 18, 2014 at 3:04 PM
Edited Aug 18, 2014 at 6:01 PM
Paul,

thanks for your answer.

I use TileAsyncLayer ... Is that a problem ? Since it ihnerits from TileLayer I guess not.

I use winform version of sharpmap.

Also, I'm working with the source of Sharpmap ... not the referenced .dll so I have a bit more power over it.

I'll let you know how it went ...

Thanks
Developer
Aug 19, 2014 at 12:42 PM
Olyster wrote:
Also, I'm working with the source of Sharpmap ... not the referenced .dll so I have a bit more power over it.
Way to go! Tweak MapViewportGuard class to allow only zoom values that match the resolutions defined in the schema.
Aug 27, 2014 at 4:32 PM
Thanks to both of you ! It works !
Developer
Aug 28, 2014 at 6:27 AM
As this seems to be SharpMap related, could I kindly request that you send a patchfile.
TIA FObermaier
Aug 28, 2014 at 2:18 PM
Hi,

I think that this is not a problem but a requirement on my side. Not everybody will want this behavior. The code is specific for a client and includes other modifications for other functionnalities related to restraining the map to schema levels only.

Thanks