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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please wait...

SUBSCRIBE TO CYPRUS DAMS MEASUREMENTS NEWS

Want to be notified when our Cyprus Dams article updated? Enter your email address and name below to be the first to know.
%d bloggers like this: