I am working with c++/QT and c++api gqis 2.8.2
I want to change the geometry of a feature, I have this code :
QgsVectorLayer * lLayer = mMapLayer.value(TRACKS);
QgsVectorDataProvider * lDataProvider;
lDataProvider = lLayer->dataProvider();
//create point
gsGeometry * MyPoint;
MyPoint = QgsGeometry::fromPoint(QgsPoint(PosX,PosY));
QgsGeometryMap MyGeometryMap;
QgsFeatureId MyFeatureId;
MyGeometryMap.insert(MyFeatureId,MyPoint);
lDataProvider->changeGeometryValues(MyGeometryMap);
I don't understand why i have an error on the insert :
error: no matching function for call to ‘QMap::insert(QgsFeatureId&, QgsGeometry*&)’ MyGeometryMap.insert(MyFeatureId,MyPoint); ^ src/IHM/mainwindow.cpp:599:42: note: candidate is: In file included from /usr/local/Trolltech/Qt-4.8.5/include/QtCore/qvariant.h:49:0, from /usr/local/Trolltech/Qt-4.8.5/include/QtCore/QVariant:1, from /usr/local/include/qgis/qgis.h:25, from src/Core/common.h:13, from src/Core/libcarto.h:12, from src/IHM/mainwindow.h:24, from src/IHM/mainwindow.cpp:20:
Any idea ?