Discussion:
[mapguide-users] XYZ-Tiles of different size
Gunter Becker
2018-02-05 09:06:39 UTC
Permalink
Hi,

is it possible to generate xyz-tiles of a different size than 256 x 256
pixels?

We are using OpenLayers as our viewer and print our maps with MapFish Print
<https://github.com/mapfish/mapfish-print> . The problem is that when
trying to print layers of type "xyz" the print output is extreamly pixelated
while layers from a tiled wms source looks nice. OL and MapFish Print seem
to support different sizes than 256 x 256. Especially for "retina/hidpi
devices" there are properties to set the tile size: OL ( ol.source.XYZ -
tileSize,tilePixelRatio
<https://openlayers.org/en/latest/apidoc/ol.source.XYZ.html> ), MapFish
Print ( OSM Layer - tileSize, dpi
<http://mapfish.github.io/mapfish-print-doc/layers.html#Osm%20Layer> ).

Maybe there is any undocumented request parameter for the
GETTILEIMAGE-Request of the WebApi? Or maybe it is configurable in the
serverconfig.ini?

Gunter



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-02-05 10:41:38 UTC
Permalink
Sorry, not at the moment. XYZ tiles are currently always fixed at 256x256
pixels.

If "retina" tiles is just the same bounding box rendered out to a 512x512
tile instead of 256x256, it would not be difficult to implement support for
retina tiles (We can enable retina tiles via a new parameter in the XYZ
TileSetDefinition).

I just need confirmation around the definition of what a "retina" tile
actually is. Is it just the size of the tile? Or are there other factors
that make a tile "retina"?

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-02-09 10:14:22 UTC
Permalink
Assuming retina means a tile on a XYZ grid scheme whose size is [some
multiple of 256 pixels]^2 then a practical short term solution would be to
try and implement this in mapguide-rest first, let the feature incubate a
bit and get its kinks ironed out and when it's been proven to work there,
then we can port it over to MapGuide proper.

mapguide-rest has proven to be a nice experimental testbed for features that
have eventually made it into MapGuide (original XYZ tile support is one such
example). We could do the same thing for retina XYZ tiles.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Gunter Becker
2018-02-09 11:03:25 UTC
Permalink
That would be really cool!

I'm already using mapguide-rest for consuming vector data in OpenLayers. So
I think it would be easy for me to test this feature in my web application
(printing solution) as soon it is available im mapguide-rest.

Gunter





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-02-11 22:06:10 UTC
Permalink
If you know how to use/build mapguide-rest from master, I've landed a first
cut implementation of "retina" xyz tiles.

Details: https://github.com/jumpinjackie/mapguide-rest/issues/181

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Hans Milling
2018-02-05 14:06:52 UTC
Permalink
Could it be this bug:
http://osgeo-org.1560.x6.nabble.com/MapGuide-WMS-images-scaled-blurry-td5083082.html
I think it has something to do with the DPI you set on your map. if you want
higher resolution you need to increase the DPI from the standard 72 or 96 to
150 or 300.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Gunter Becker
2018-02-05 15:05:41 UTC
Permalink
Hi Hans,

Not exactly, since this bug, I think, refers to an external WMS service your
FeatureSource is pointing to. In this case I think the MapGuide Server
should have already requested the external WMS with a higher dpi value, as
you mentioned, to get the result you have seen from the other server!

But you are pointing in the right direction. XYZ-Tiles with a doubled size
of 512 x 512 pixel should not only be resized twice. They should also have
the correct label or symbol size and therefore must also be resized in
relation to dpi. That's like the behaviour you have mentioned for WMS
services. And I geuss that's also the reason why the GETMAPIMAGE
WebApi-Methodes has a dpi value. At least I have used it with higher dpi
(150) in the past for printing high quality maps.

Gunter





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Continue reading on narkive:
Search results for '[mapguide-users] XYZ-Tiles of different size' (Questions and Answers)
11
replies
How much would this house cost?
started 2020-08-14 02:12:50 UTC
decorating & remodeling
Loading...