[QGIS-Developer] QGIS3: QgsCoordinateTransform Error

C Hamilton adenaculture at gmail.com
Fri Dec 22 08:06:25 PST 2017

I'm not sure what to do with this API break for my QGIS 3 plugin. Can
anyone explain what is wrong and what needs to change or is this a bug?
This showed up with QGIS 3 version 2.99.0-245. In my code I have  the

        canvasCrs = self.canvas.mapSettings().destinationCrs()
        transform = QgsCoordinateTransform(epsg4326, canvasCrs)
        x, y = transform.transform(float(lon), float(lat))

I get this error:

Traceback (most recent call last):
line 371, in canvasPointXY
    transform = QgsCoordinateTransform(epsg4326, canvasCrs)
TypeError: QgsCoordinateTransform(): arguments did not match any overloaded
  overload 1: too many arguments
  overload 2: not enough arguments
  overload 3: not enough arguments
  overload 4: not enough arguments
  overload 5: argument 1 has unexpected type 'QgsCoordinateReferenceSystem'


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171222/c0bbf4a3/attachment.html>

More information about the QGIS-Developer mailing list