Opened 16 years ago

Closed 16 years ago

#8113 closed (fixed)

Google zoom fails when geom envelope is a single point

Reported by: santiago_aguiar Owned by: nobody
Component: GIS Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.contrib.gis.maps.google.zoom.get_width_height fails when then envelope it's a single point. Only happens in extreme cases (point or polygons in which all the points are the same).

The provided patch just returns width=0, height=0, and the zoom level is eventually returned as 18.

Attachments (1)

geodjango_google_zoom_env.patch (890 bytes ) - added by santiago_aguiar 16 years ago.
Simple patch

Download all attachments as: .zip

Change History (3)

by santiago_aguiar, 16 years ago

Simple patch

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by jbronn, 16 years ago

Resolution: fixed
Status: newclosed

(In [8428]) Fixed #8113. Made get_width_height a GoogleZoom method that takes the extent instead of an envelope so it may handle Point geometries. Thanks to Santiago Aguiar for the bug report.

Note: See TracTickets for help on using tickets.
Back to Top