Ticket #8113: geodjango_google_zoom_env.patch

File geodjango_google_zoom_env.patch, 890 bytes (added by santiago_aguiar, 16 years ago)

Simple patch

  • django/contrib/gis/maps/google/zoom.py

     
    99def get_width_height(envelope):
    1010    # Getting the lower-left, upper-left, and upper-right
    1111    #  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])
    1519   
    16     height = ll.distance(ul)
    17     width  = ul.distance(ur)
    18     return width, height
     20        height = ll.distance(ul)
     21        width  = ul.distance(ur)
     22    return height, width
    1923
    2024class GoogleZoom(object):
    2125    """
Back to Top