示例#1
0
 def toPixels(self, zoom):
     self.mode = 'pixel'
     self.northeast = Units.latlng_to_pixel(self.northeast, zoom)
     self.southwest = Units.latlng_to_pixel(self.southwest, zoom)
     self.top = self.northeast[1]
     self.right = self.northeast[0]
     self.bottom = self.southwest[1]
     self.left = self.southwest[0]
示例#2
0
 def toPixels(self, zoom):
     self.mode = 'pixel'
     self.northeast = Units.latlng_to_pixel(self.northeast, zoom)
     self.southwest = Units.latlng_to_pixel(self.southwest, zoom)
     self.top = self.northeast[1]
     self.right = self.northeast[0]
     self.bottom = self.southwest[1]
     self.left = self.southwest[0]
示例#3
0
 def get_pixel_coordinates_from_models(self, models, zoom, minXPixels, minYPixels):
     pixels = []
     for model in models:
         if model.point is not None:
             pixel = Units.latlng_to_pixel(model.point, zoom)
             pixel = (pixel[0] - minXPixels, pixel[1] - minYPixels)
             pixels.append(pixel)
     return pixels
示例#4
0
 def get_pixel_coordinates_from_models(self, models, zoom, minXPixels,
                                       minYPixels):
     pixels = []
     for model in models:
         if model.point is not None:
             pixel = Units.latlng_to_pixel(model.point, zoom)
             pixel = (pixel[0] - minXPixels, pixel[1] - minYPixels)
             pixels.append(pixel)
     return pixels