REFACTORING : implement setter methods for coordinates and zoom to make easier the...
[wifihood] / wifiscanner / wifimap / view.py
index a3719cc..959e871 100755 (executable)
@@ -31,7 +31,7 @@ class AbstractmapWidget :
 
        # FIXME : instead of hardcoded, should depend on the actual display size
        if distance > 150 :
-            self.conf.lat , self.conf.lon = latlon
+            self.conf.set_latlon( latlon )
 
             self.reftile_x , self.refpix_x = self.lon2tilex( self.conf.lon , self.conf.zoom )
             self.reftile_y , self.refpix_y = self.lat2tiley( self.conf.lat , self.conf.zoom )
@@ -55,7 +55,7 @@ class AbstractmapWidget :
         lon = self.tilex2lon( ( self.reftile_x , self.refpix_x ) , self.conf.zoom )
         self.reftile_x , self.refpix_x = self.lon2tilex( lon , zoom )
         self.reftile_y , self.refpix_y = self.lat2tiley( lat , zoom )
-        self.conf.zoom = zoom
+        self.conf.set_zoom( zoom )
         self.composeMap()
         self.show()