Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I try to add a wms-Layer to QGIS Desktop from my plugin(c++)

QString uri= "crs=EPSG:28992&layers=natura2000:natura2000&styles=&format=image/png&url=http://geodata.nationaalgeoregister.nl/natura2000/ows?

QString myProviderName      = "wms";
QgsRasterLayer* lyr= mQGisIface->addRasterLayer(uri ,"test", myProviderName);

But in QGis i get the Message, the extent of the layer could not be calculated because of unknown dataprovider.

What do i wrong? In QGIs Desktop manually adding this wms-layer is possible without problems. I also tested several other wms with same result.

Thanks for all help.

share|improve this question
    
Sorry, i have an error in building the uri. the code is correct. the plugin is working now. –  schmiddor Dec 12 '12 at 15:32
    
I'm having similar problem, can you explain how you fixed it? Sorry to put this in "answer" and not in comment, but as a new user I'm not allowed to leave comments. –  Mauricio Vidulin Jun 27 at 9:37
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.