This was taken from your plugin... I only added the possibility to add the clone to the QgsMapLayerRegistry. Anyway, if I attempt to check the v_type, I can't use QGis.LineString (I might choose WKBLineString or WKBMultiLineString, or others), whereas QGis.Point, QGis.Line and QGis.Polygon are available. Do you have any suggestions?