Skip to content

Commit

Permalink
✨ Add new project option: WMS GetMap image format (#627)
Browse files Browse the repository at this point in the history
* Add qdjango.Project property `wms_getmap_format`: used by G3W-CLIENT for GetMap request on WMS service.

* ✨ Client:
    core: get wms_getmap_format project paramter

* Add case "graduatedSymbol" to getlegendgraphic filter.

* ⬆️ Client:
    g3w-client : g3w-suite/g3w-client@7d6742b

* Blank=False for 'wms_getmap_format' qdjango.Project model field.

* Add 'image/png; mode=1bit' case.

* Fix test for project form.

* Fix test_embedded_layers.

* add the undocumented WEBP image format (#655)

* remove `Format` suffix from options

* code format

* restore Project props

* code format

* code format

* auto-format

Ref: https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4ABkAD9dAD2IimZxl1N_W1ktIvcnCRyz_JxMldeGP3TwRU_gPIa13JTv2F9kfwzF9V0Fo_N6qvQp_ZHKuwSp54EGCp-ZAAAABxwcWSuM-T8AAVtlY6QRRB-2830BAAAAAARZWg==

* Fix migrations tree

* Fix migrations tree

* Typo

---------

Co-authored-by: wlorenzetti <[email protected]>
Co-authored-by: volterra79 <[email protected]>
Co-authored-by: Tudor Barascu <[email protected]>
Co-authored-by: Raruto <[email protected]>
  • Loading branch information
5 people authored Nov 29, 2023
1 parent cede88a commit 7ad9a63
Show file tree
Hide file tree
Showing 8 changed files with 720 additions and 267 deletions.
2 changes: 1 addition & 1 deletion g3w-admin/client/static/client/css/app.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion g3w-admin/qdjango/api/projects/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ class Meta:
'wms_use_layer_ids',
'qgis_version',
'toc_layers_init_status',
'toc_themes_init_status'
'toc_themes_init_status',
'wms_getmap_format'
)


Expand Down
200 changes: 136 additions & 64 deletions g3w-admin/qdjango/forms/projects.py

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions g3w-admin/qdjango/migrations/0109_project_wms_getmap_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 3.2.19 on 2023-07-04 10:03

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('qdjango', '0109_filterlayersaved'),
]

operations = [
migrations.AddField(
model_name='project',
name='wms_getmap_format',
field=models.CharField(
blank = False,
choices = [
('image/png; mode=1bit', 'PNG 1bit'),
('image/png; mode=8bit', 'PNG 8bit'),
('image/png; mode=16bit', 'PNG 16bit'),
('image/png', 'PNG'),
('image/jpeg', 'JPEG'),
('image/webp', 'WEBP'),
],
default = 'image/png; mode=8bit',
max_length = 255,
null = True,
verbose_name = 'WMS GetMap image format'
),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Migration(migrations.Migration):

dependencies = [
('qdjango', '0109_filterlayersaved'),
('qdjango', '0109_project_wms_getmap_format'),
]

operations = [
Expand Down
Loading

0 comments on commit 7ad9a63

Please sign in to comment.