|
140 | 140 | }
|
141 | 141 |
|
142 | 142 | function test_createLayer(t) {
|
143 |
| - t.plan(27); |
| 143 | + t.plan(34); |
144 | 144 |
|
145 | 145 | var format = new OpenLayers.Format.WMTSCapabilities();
|
146 | 146 |
|
|
230 | 230 | t.eq(layer.dimensions.length, 1, "correct dimensions length");
|
231 | 231 | t.eq(layer.dimensions[0], "Time", "correct dimensions");
|
232 | 232 | t.eq(layer.params['TIME'], "2012", "correct params");
|
| 233 | + |
| 234 | + // test projection and units |
| 235 | + layer = format.createLayer(caps, { |
| 236 | + layer: "ch.are.agglomerationen_isolierte_staedte-2000", |
| 237 | + matrixSet: "21781", |
| 238 | + units: 'degrees' |
| 239 | + }); |
| 240 | + t.eq(layer.units, "degrees", "correct units"); |
| 241 | + layer = format.createLayer(caps, { |
| 242 | + layer: "ch.are.agglomerationen_isolierte_staedte-2000", |
| 243 | + matrixSet: "21781", |
| 244 | + projection: "EPSG:4326" |
| 245 | + }); |
| 246 | + t.eq(layer.projection.getCode(), "EPSG:4326", "correct projection"); |
| 247 | + t.eq(layer.units, "degrees", "correct units"); |
| 248 | + layer = format.createLayer(caps, { |
| 249 | + layer: "ch.are.agglomerationen_isolierte_staedte-2000", |
| 250 | + matrixSet: "21781", |
| 251 | + projection: "EPSG:4326", |
| 252 | + units: 'm' |
| 253 | + }); |
| 254 | + t.eq(layer.projection.getCode(), "EPSG:4326", "correct projection"); |
| 255 | + t.eq(layer.units, "m", "correct units"); |
| 256 | + layer = format.createLayer(caps, { |
| 257 | + layer: "ch.are.agglomerationen_isolierte_staedte-2000", |
| 258 | + matrixSet: "21781", |
| 259 | + projection: "EPSG:900913", |
| 260 | + units: 'degrees' |
| 261 | + }); |
| 262 | + t.eq(layer.projection.getCode(), "EPSG:900913", "correct projection"); |
| 263 | + t.eq(layer.units, "degrees", "correct units"); |
233 | 264 | }
|
234 | 265 |
|
235 | 266 | function test_parse_projection(t) {
|
|
0 commit comments