Ticket #8113: geodjango_google_zoom_env.patch
File geodjango_google_zoom_env.patch, 890 bytes (added by , 16 years ago) |
---|
-
django/contrib/gis/maps/google/zoom.py
9 9 def get_width_height(envelope): 10 10 # Getting the lower-left, upper-left, and upper-right 11 11 # coordinates of the envelope. 12 ll = Point(envelope[0][0]) 13 ul = Point(envelope[0][1]) 14 ur = Point(envelope[0][2]) 12 if envelope.num_coords == 1: 13 height = 0 14 width = 0 15 else: 16 ll = Point(envelope[0][0]) 17 ul = Point(envelope[0][1]) 18 ur = Point(envelope[0][2]) 15 19 16 height = ll.distance(ul)17 width = ul.distance(ur)18 return width, height20 height = ll.distance(ul) 21 width = ul.distance(ur) 22 return height, width 19 23 20 24 class GoogleZoom(object): 21 25 """