I study Chinese cities a lot and would like to use BAIDU map tiles in QGIS.

Can anyone advise me on how to go about this?

I haven’t been able to find any advice on achieving this on the web.


So I just did a bit of Googling and have managed to get the XYZ URL to render in QGIS. However, I think there is a problem with the coordinate system. So long as you are making your own shapefiles, this shouldn't be a problem. If you're using imported shapefiles, it might be possible to manually move them into place within the Web Mercator projection because that is what Baidu Maps is claimed to be built off.

To set up Baidu Maps in QGIS 3+ make sure you have the Browser panel open and right click on "XYZ Tiles" and select "New Connection". Inside the URL, enter http://online1.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={-y}&z={z}&styles=pl&scaler=1&p=1. In the zoom levels, enter 0 to 19. The name can be anything you want. Then just press okay. After doing this, you should be able to add a Baidu maps layer from the Browser panel.

I found that the service places Beijing somewhere in Antarctica southwest of South America when in ESPG:3857. This may be due to the service using a proprietary map projection. There might be some smarter people than me who know how to do that conversion, but I am not that clever. So maybe load an OpenStreetMap layer first and navigate to the rough location of China first before switching over to the Baidu maps layer.

OSM-Baidu Comparison

I hope this provides you a reasonable workaround in the meantime.

| improve this answer | |
  • I looked at the maptalk source code to see how it does it, and it has a config for Baidu tiles that sets the origin corner to (0,0) rather than (-180, -90) like most map tile sets. I don't think this is implemented in QGIS XYZ tile layer source. – Spacedman Mar 16 '19 at 9:34
  • Thank you MowgliB and Spacedman. This is helpful. Spacedman how would I adjust the projection so it aligns with other map tiles such as osm? – SHAW Mar 16 '19 at 14:01

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.