Remi-C / interactive_map_tracking

A QGIS 2.6 plugin to track camera of user , AND/OR to autocommit/refresh edit on PostGIS vector layer
http://remi-c.github.io/interactive_map_tracking/
GNU General Public License v3.0
8 stars 4 forks source link

Tracking : Switch from measuring rectangle to use zoom level #9

Closed Remi-C closed 9 years ago

Remi-C commented 9 years ago

@yoyonel The idea is to use the zoom level (aka scale) rather than a fixed meter size as a threshold.

It could solve our problem in #7 and #8

Remi-C commented 9 years ago

@yoyonel : maybe you add trouble to close the other issue because it was referenced here?

Remi-C commented 9 years ago

@yoyonel You canno't close this issue, because it is not fixed ! (at least the last commit on master doesn't seems to fix it)

Remi-C commented 9 years ago

@yoyonel : this maybe ? http://qgis.org/api/classQgsScaleWidget.html

Remi-C commented 9 years ago

Nice ! I'm a little worried because 200:1 could be valid, and could not be transformed into 1:Int (as stated in the comment). But I did'nt test so it is just guessing ^^

yoyonel commented 9 years ago

Good intuition, but right now the script don't care about 'a' (for the input: 'a':'b') It validates the types for 'a' and 'b' ([int]), and uses only 'b' to change the scale value. After this validation, the text in Qt Line edit is changed/modified to : "1:'b'" so ... TADA ^^

Remi-C commented 9 years ago

Ok,
so I add this to limitations (can't have a scale above 1 in threshold). Not a big deal in real life application I feel, and easy enough to fix for next version (I'll create a ticket and put it to "future")

I tested it and couldn't load the plugin Traceback (most recent call last): File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 217, in startPlugin plugins[packageName].initGui() File "C:/Documents and Settings/T0111151/.qgis2/python/plugins\interactive_map_tracking\interactive_map_tracking.py", line 227, in initGui self.init_plugin() File "C:/Documents and Settings/T0111151/.qgis2/python/plugins\interactive_map_tracking\interactive_map_tracking.py", line 313, in init_plugin QObject.connect(self.dlg.threshold_extent, SIGNAL("returnPressed ()"), self.thresholdChanged()) TypeError: arguments did not match any overloaded call: QObject.connect(QObject, SIGNAL(), QObject, SLOT(), Qt.ConnectionType=Qt.AutoConnection): argument 3 has unexpected type 'NoneType' QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection): argument 3 has unexpected type 'NoneType' QObject.connect(QObject, SIGNAL(), SLOT(), Qt.ConnectionType=Qt.AutoConnection): argument 2 has unexpected type 'str'

yoyonel commented 9 years ago

It's fixed, but mistake in my message commit ^^ I'm not fully awaked

Remi-C commented 9 years ago

Oho no soucy ;-)

Remi-C commented 9 years ago

Ok, tested, works.☺ Also work for 1:0 input