[Qgis-developer] Unable to invoke fileVectorFilters() // Adding jpeg to mapcanvas?

Schalk Snyman snymans at wbs.co.za
Fri Oct 6 17:15:24 EDT 2006


Hi everyone,

1. Can someone tell me what this output means (and perhaps how to fix
it :-) ? 

I'm trying to display a shapefile (11.4MB) as a map and two
delimited-text file layers on top of it. The delimited text layers add
fine, but the shapefile is not displaying. I change the projection
before I add it, to one of the srsids.

Here's my settings: (works for the polys.shp: shapefile of the world
example)

QString myLayerPath         = "layers";	//relative to execution dir
QString myLayerBaseName     = "long_name";
QString myProviderName      = "ogr";

and the output:
----------------------------------------------
(fileVectorFilters), Driver count: : 0

Unable to invoke fileVectorFilters()

qgsmaprender.cpp: 154: (adjustExtentToSize) Current extent is
0.0000000000000000,0.0000000000000000 :
0.0000000000000000,0.0000000000000000
----------------------------------------------

2. How to add a jpeg image to a mapcanvas, if possible?

I have this code from qgsrasterlayer.h
------------------------------------------------------------
 QString myFileNameQString = "layers/final2.jpg";
 QFileInfo myFileInfo(myFileNameQString);
 QString myBaseNameQString = myFileInfo.baseName();
 QgsRasterLayer *myRasterLayer = new QgsRasterLayer(myFileNameQString,
myBaseNameQString);

 connect( myRasterLayer, SIGNAL(repaintRequested()), mapCanvas,
SLOT(refresh()) ); // necessary?
 -----------------------------------------------------------

Dazed and confused...

Schalk



More information about the Qgis-developer mailing list