Merge lp:~camptocamp/geospatial-addons/6.1-swiss-topo-zoom-20130111 into lp:~geospatial-addons-core-editors/geospatial-addons/6.1

Proposed by Yannick Vaucher @ Camptocamp
Status: Merged
Merged at revision: 88
Proposed branch: lp:~camptocamp/geospatial-addons/6.1-swiss-topo-zoom-20130111
Merge into: lp:~geospatial-addons-core-editors/geospatial-addons/6.1
Diff against target: 23 lines (+5/-1)
1 file modified
base_geoengine/static/src/js/geoengine_view.js (+5/-1)
To merge this branch: bzr merge lp:~camptocamp/geospatial-addons/6.1-swiss-topo-zoom-20130111
Reviewer Review Type Date Requested Status
Nicolas Bessi - Camptocamp (community) Approve
Review via email: mp+142876@code.launchpad.net

Description of the change

Remove degree of max zoom to avoid pixelized maps

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

 5 ,2.5] -> 5, 2.5]

Are you sure it's a "==" on line 9 (and not a "!=") ?

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Yes I'm sure about the "==" ch.swisstopo.swissimage are the only type which have a higher precision.

Other swisstopo map type like ch.swisstopo.pixelkarte-farbe haven't better precision than 1:25000

89. By Yannick Vaucher @ Camptocamp

[IMP] base_geoengine - slipping coma (not sleeping coma)

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

OK, I had misunderstood. It's OK for me to merge, but if you have a couple of hours more, I think there are a couple of weird assumptions made there, and some hardcoded stuff which ought to be handled differently.

I'm especially bothered by the attribute name "swisstopo_type" which look very ad hoc, and not generic enough. I don't know where this attribute is used but:

* it should be renamed to somethingelse_type
* and the information about the available resolutions should be conveyed directly in another place and not hardcoded in the javascript code.

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) :
review: Approve
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

@alexandre-fayolle-c2c I agree there are some improvements to do. For those, we may set them on the pipe of dev focus in 7.0. So we improve it during the migration process.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_geoengine/static/src/js/geoengine_view.js'
2--- base_geoengine/static/src/js/geoengine_view.js 2012-12-21 14:29:47 +0000
3+++ base_geoengine/static/src/js/geoengine_view.js 2013-01-11 18:05:25 +0000
4@@ -102,6 +102,10 @@
5 );
6 break;
7 case "swisstopo":
8+ var resolutions = [4000, 3750, 3500, 3250, 3000, 2750, 2500, 2250, 2000, 1750, 1500, 1250, 1000, 750, 650, 500, 250, 100, 50, 20, 10, 5, 2.5];
9+ if (l.swisstopo_type == 'ch.swisstopo.swissimage') {
10+ resolutions.push(2, 1.5, 1, 0.5);
11+ }
12 out.push(
13 new OpenLayers.Layer.WMTS({
14 name: l.name,
15@@ -110,7 +114,7 @@
16 url: ['https://wmts0.geo.admin.ch/', 'https://wmts1.geo.admin.ch/', 'https://wmts2.geo.admin.ch/'],
17 projection: 'EPSG:21781',
18 units: 'm',
19- resolutions: [4000, 3750, 3500, 3250, 3000, 2750, 2500, 2250, 2000, 1750, 1500, 1250, 1000, 750, 650, 500, 250, 100, 50, 20, 10, 5 ,2.5, 2, 1.5, 1, 0.5],
20+ resolutions: resolutions,
21 maxExtent: [420000, 30000, 900000, 350000],
22 requestEncoding: 'REST',
23 matrixSet: '21781',

Subscribers

People subscribed via source and target branches