Opened 6 years ago

Closed 5 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 6 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 5 years ago.
Patch with tests

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by Paul Winkler

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

comment:1 Changed 6 years ago by Paul Winkler

Has patch: set

comment:2 Changed 6 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by James Addison

Severity: Normal
Type: New feature

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

comment:4 Changed 6 years ago by Julien Phalip

Needs tests: set

comment:5 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

Changed 5 years ago by Claude Paroz

Attachment: 14886-2.diff added

Patch with tests

comment:7 Changed 5 years ago by Claude Paroz

Needs tests: unset

comment:8 Changed 5 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin

Planned to be committed soon.

comment:9 Changed 5 years ago by Claude Paroz <claude@…>

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