Code

Opened 4 years ago

Closed 2 years ago

#14886 closed New feature (fixed)

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

Reported by: slinkp 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 slinkp 4 years ago.
this version of the patch allows passing arbitrary options to the WMS layer constructor
14886-2.diff (3.9 KB) - added by claudep 2 years ago.
Patch with tests

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by slinkp

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

comment:1 Changed 4 years ago by slinkp

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 3 years ago by jaddison

  • Severity set to Normal
  • Type set to New feature

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

comment:4 Changed 3 years ago by julien

  • Needs tests set

comment:5 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Changed 2 years ago by claudep

Patch with tests

comment:7 Changed 2 years ago by claudep

  • Needs tests unset

comment:8 Changed 2 years ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

Planned to be committed soon.

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

  • Resolution set to fixed
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.