Opened 14 years ago

Closed 13 years ago

#14886 closed New feature (fixed)

GeoModelAdmin forms cannot be used with WMS in formats other than image/jpeg

Reported by: Paul Winkler Owned by: nobody
Component: GIS Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm using a subclass of contrib.gis.admin.GeoModelAdmin with http://maps.opengeo.org/geowebcache/service/wms as the wms_url.

The problem is that templates/gis/admin/openlayers.js does not allow specifying the image format, so it uses the OpenLayers default of image/jpeg,
which some base layers (notably http://maps.opengeo.org/geowebcache/service/wms) do not support.
So I have to fork a copy of the template just to add that one parameter to one line of javascript.

Patch that fixes this attached.

Attachments (2)

geomodeladmin_format_patch.diff (2.0 KB ) - added by Paul Winkler 14 years ago.
this version of the patch allows passing arbitrary options to the WMS layer constructor
14886-2.diff (3.9 KB ) - added by Claude Paroz 13 years ago.
Patch with tests

Download all attachments as: .zip

Change History (11)

by Paul Winkler, 14 years ago

this version of the patch allows passing arbitrary options to the WMS layer constructor

comment:1 by Paul Winkler, 14 years ago

Has patch: set

comment:2 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:3 by James Addison, 14 years ago

Severity: Normal
Type: New feature

As this adds to existing functionality, I'm marking it as a 'new feature'.

comment:4 by Julien Phalip, 14 years ago

Needs tests: set

comment:5 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

by Claude Paroz, 13 years ago

Attachment: 14886-2.diff added

Patch with tests

comment:7 by Claude Paroz, 13 years ago

Needs tests: unset

comment:8 by Claude Paroz, 13 years ago

Triage Stage: AcceptedReady for checkin

Planned to be committed soon.

comment:9 by Claude Paroz <claude@…>, 13 years ago

Resolution: fixed
Status: newclosed

In [ce8f874b88942863be17b4ee02bb27632cc0e65e]:

Fixed #14886 -- Added wms_options dict to GeoModelAdmin.

It is now possible to set WMS options by overriding wms_options
in a subclass of GeoModelAdmin.
Thanks slinkp for the report and the initial patch.

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