#9210 closed (invalid)
zoom does not effected, when use GoogleMap(zoom=x, ...) with zoom params..
Reported by: | Owned by: | jbronn | |
---|---|---|---|
Component: | GIS | Version: | 1.0 |
Severity: | Keywords: | google zoom gis | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In the google map template js file( django/contrib/gis/templates/gis/google/js/google-map.js)
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds))
should be changed to:
map.setCenter(bounds.getCenter(), {{ zoom }})
otherwise when use GoogleMap(zoom=x, ...)
with zoom params, zoom does not effected actually .
Change History (4)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|---|
Keywords: | google zoom gis added |
Owner: | changed from | to
comment:2 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 16 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
The problem here is that you're not specifying a coordinate pair to center the zoom at. When no default zoom level and center coordinate is provided, and overlays are passed in (e.g., via the
polygons
,polylines
ormarkers
keywords), then the default behavior is to calculate an appropriate zoom level in the JavaScript. Thus, all you need to do is: