Пример #1
0
 def _calc_bounds(self, change):
     markers = change["new"]
     locations = [marker.location for marker in markers]
     latitudes = [location[0] for location in locations]
     longitudes = [location[1] for location in locations]
     min_latitude, max_latitude = bounds.latitude_bounds(latitudes)
     min_longitude, max_longitude = bounds.longitude_bounds(longitudes)
     self.data_bounds = [(min_latitude, min_longitude),
                         (max_latitude, max_longitude)]
Пример #2
0
 def _calc_bounds(self, change):
     markers = change['new']
     if markers:
         locations = [marker.location for marker in markers]
         latitudes = [location[0] for location in locations]
         longitudes = [location[1] for location in locations]
         min_latitude, max_latitude = bounds.latitude_bounds(latitudes)
         min_longitude, max_longitude = bounds.longitude_bounds(longitudes)
         self.data_bounds = [(min_latitude, min_longitude),
                             (max_latitude, max_longitude)]
         self.has_bounds = True
     else:
         self.has_bounds = False
Пример #3
0
 def _calc_bounds(self, change):
     markers = change['new']
     if markers:
         locations = [marker.location for marker in markers]
         latitudes = [location[0] for location in locations]
         longitudes = [location[1] for location in locations]
         min_latitude, max_latitude = bounds.latitude_bounds(latitudes)
         min_longitude, max_longitude = bounds.longitude_bounds(longitudes)
         self.data_bounds = [
             (min_latitude, min_longitude),
             (max_latitude, max_longitude)
         ]
         self.has_bounds = True
     else:
         self.has_bounds = False
Пример #4
0
 def _longitude_bounds(self, longitudes):
     return bounds.longitude_bounds(longitudes)