Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to connect my QGis to a WMS-C server when my python plugin load. How can I do that ?

BTW, the method: addRasterLayer do not seams to handle WMS-C layer...

share|improve this question
up vote 2 down vote accepted

With 1.7.4 you can use:

qgis.utils.iface.addRasterLayer( "tiled=256;256;0.703125;0.3515625;0.17578125;0.087890625;0.0439453125;0.02197265625;0.010986328125;0.0054931640625;0.00274658203125;0.001373291015625;0.0006866455078125;0.00034332275390625;0.000171661376953125;0.0000858306884765625;0.00004291534423828125;0.00002145767211914062;0.00001072883605957031;0.00000536441802978516;0.00000268220901489258;0.00000134110450744629,url=http://labs.metacarta.com/wms-c/tilecache.py?", "Metacarta basic WMS-C layer", "wms", ["basic"], [""], "image/png", "EPSG:4326" )

The tiled= argument consists of tile width, height and the available resolutions.

share|improve this answer
    
Thanks !! That's it ! – Djabx Jun 15 '12 at 15:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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