Example #1
0
 def routeFrom(self, fromWhere):
     """Route from somewhere to this POI"""
     if fromWhere == 'currentPosition':  # route from current position to this POI
         pos = modrana.get('pos', None)
         if pos:
             (fromLat, fromLon) = pos
             # clear old route (if any) and route to the point
             modrana.sendMessage(
                 'route:clearRoute|md:route:route:type=ll2ll;fromLat=%f;fromLon=%f;toLat=%f;toLon=%f;'
                 % (fromLat, fromLon, self.lat, self.lon))
Example #2
0
 def routeFrom(self, fromWhere):
     """Route from somewhere to this POI"""
     if fromWhere == 'currentPosition': # route from current position to this POI
         pos = modrana.get('pos', None)
         if pos:
             (fromLat, fromLon) = pos
             # clear old route (if any) and route to the point
             modrana.sendMessage(
                 'route:clearRoute|md:route:route:type=ll2ll;fromLat=%f;fromLon=%f;toLat=%f;toLon=%f;' %
                 (fromLat, fromLon, self.lat, self.lon)
             )
Example #3
0
 def showOnMap(self):
     """Recentre to this POI and show its marker and label"""
     modrana.sendMessage(
         'mapView:recentre %f %f|showPOI:drawActivePOI|set:menu:None' %
         (self.lat, self.lon))
Example #4
0
 def showOnMap(self):
     """Recentre to this POI and show its marker and label"""
     modrana.sendMessage('mapView:recentre %f %f|showPOI:drawActivePOI|set:menu:None' %
                         (self.lat, self.lon))