I'm developing a GIS app using OpenLayers-3. In this app, users draw features and print the map.

Suppose the user draws his features in a large area. Now to print all his features, he would zoom out until all his features are in the screen. In this zoom level, quality of print will be very low.

I want the user to set a zoom level and then print all features in this zoom level. In this state, it's possible some features will not be visible. Finally the result should be a high quality image, with resolution greater than screen resolution.

How can I Implement that?

  • Do you know mapfish print, that could be your solution
    – oterral
    Commented Mar 8, 2016 at 9:52
  • 2
    your background map will need to be high res, most web tiles are only 72dpi for good quality 150dpi (300dpi recommended). You might be needing to look into vector tiles example openlayers.org/en/v3.5.0/examples/tile-vector.html
    – Mapperz
    Commented Mar 9, 2016 at 14:56
  • 1
    It should be achievable with ordinary tiles. I would take the following steps: save the bounding box of the current screen -> alter viewport dimensions (A4 with 600 dpi is roughly 7016x4961 in landscape mode) -> zoom to saved extent -> export image from canvas -> modify dimensions to original size -> zoom to saved extent. Commented Mar 9, 2016 at 15:12
  • @GaborFarkas can you show a sample code? Commented Mar 10, 2016 at 6:10
  • When I'll have some spare time, I'll cook up an example for you. Commented Mar 10, 2016 at 7:52

1 Answer 1


You can change the resolution of the displayed tiles. Documentation can be found on the API page of the OpenLayers website. The max resolution will depend on the source. This link will direct you to the tile resolution settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.