I am loading an OSM street map into an application I am building. I load it as a raster layer via an XML document with the OSM GDAL data. My problem is that the map appears heavily mangled and pixellated, such that labels are virtually illegible:


I have noticed that setting the window size can sometimes make this issue less severe, but it's not much of a fix. Is this an issue with my XML file? The XML looks like this:

  <Service name="TMS">
  <Cache />

As far as I know, my extents are set correctly, and reprojection doesn't seem to be relevant (I've tried it in regular Web Mercator as well as reprojecting in WGS84. It looks like this in both)

Is there something I can add to the XML document to fix this pixellation issue?

1 Answer 1


You have to set the scale to the fixed resolutions of the zoom levels.

The TileMapScale Plugin does that for you.

Apart from that, the QuickMapServices Plugin does a far better work than the XML.

  • 1
    Thanks for your reply. This seems pretty intuitive in QGIS proper, but my big issue is getting something like this for an application developed out of QGIS. My understanding is that plugins don't agree well with standalone applications. This is a tip in the right direction though.
    – Alex92
    Oct 14, 2015 at 19:06
  • Since the plugins are open source, you can look up the source code and take whatever you need into your own application.
    – AndreJ
    Oct 15, 2015 at 3:47
  • Unfortunately I'm pretty new to the OSM crossover to QGIS, so I'm having trouble making sense of much of this code. I've never dealt with manually altering scales, and whenever I try to import the relevant modules, I don't get an error, but also nothing changes on my canvas. I've removed every instance of "iface", but so far this is all I can really wrap my head around. Translating plugin code to standalone code has always been a headache for me.
    – Alex92
    Oct 15, 2015 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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