0001-opengis-add-preferred-projection-attribute-20826.patch
passerelle/apps/opengis/migrations/0004_auto_20180219_1400.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 |
from django.db import migrations, models |
|
5 | ||
6 | ||
7 |
class Migration(migrations.Migration): |
|
8 | ||
9 |
dependencies = [ |
|
10 |
('opengis', '0003_auto_20171220_1058'), |
|
11 |
] |
|
12 | ||
13 |
operations = [ |
|
14 |
migrations.AddField( |
|
15 |
model_name='opengis', |
|
16 |
name='projection', |
|
17 |
field=models.CharField(default=b'EPSG:4326', max_length=256, verbose_name='Preferred projection'), |
|
18 |
), |
|
19 |
] |
passerelle/apps/opengis/models.py | ||
---|---|---|
48 | 48 |
wms_service_url = models.URLField(_('Web Map Service (WMS) URL'), max_length=256, blank=True) |
49 | 49 |
wfs_service_url = models.URLField(_('Web Feature Service (WFS) URL'), max_length=256, blank=True) |
50 | 50 |
query_layer = models.CharField(_('Query Layer'), max_length=256) |
51 |
projection = models.CharField(_('Preferred projection'), default='EPSG:4326', max_length=256) |
|
51 | 52 | |
52 | 53 |
class Meta: |
53 | 54 |
verbose_name = _('OpenGIS') |
... | ... | |
183 | 184 |
'TRANSPARENT': 'false', |
184 | 185 |
'HEIGHT': '256', |
185 | 186 |
'WIDTH': '256', |
186 |
'SRS': 'EPSG:3857',
|
|
187 |
'SRS': self.projection,
|
|
187 | 188 |
'BBOX': bbox, |
188 | 189 |
} |
189 | 190 |
return HttpResponse( |
190 |
- |