How to use offline maps in QGIS #QGIS

Other option

Example via XYZ tiles connection

file:///C:/Users/USER/Desktop/OfflineMaps/Cyprus/{z}/{x}/{y}.png

Example with code

url = 'type=xyz&url=file:///C:/Users/USER/Desktop/OfflineMaps/Cyprus/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=10&zmin=0'
layer = QgsRasterLayer(url, "CyprusOffline_python", 'wms')
QgsProject.instance().addMapLayer(layer)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s