Mercurial > gemma
comparison client/src/components/map/layers.js @ 4261:ac99e13e9ca9
layers: BBox strategy for fairwaydimensions
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 26 Aug 2019 16:18:11 +0200 |
parents | 27434b0d4d96 |
children | 18a34d9b289c |
comparison
equal
deleted
inserted
replaced
4260:5b31d1f6aa90 | 4261:ac99e13e9ca9 |
---|---|
316 style: styles.sections, | 316 style: styles.sections, |
317 source | 317 source |
318 }); | 318 }); |
319 })(), | 319 })(), |
320 (function() { | 320 (function() { |
321 const source = new VectorSource(); | 321 const source = new VectorSource({ strategy: bboxStrategy }); |
322 source.setLoader( | 322 source.setLoader( |
323 buildVectorLoader( | 323 buildVectorLoader( |
324 { | 324 { |
325 geometryName: "area", | |
325 featureTypes: ["fairway_dimensions"], | 326 featureTypes: ["fairway_dimensions"], |
326 filter: equalTo("level_of_service", 1) | 327 filter: equalTo("level_of_service", 1) |
327 }, | 328 }, |
328 source, | 329 source, |
329 true | 330 false |
330 ) | 331 ) |
331 ); | 332 ); |
332 return new VectorLayer({ | 333 return new VectorLayer({ |
333 id: "FAIRWAYDIMENSIONSLOS1", | 334 id: "FAIRWAYDIMENSIONSLOS1", |
334 label: "LOS 1 Fairway Dimensions", | 335 label: "LOS 1 Fairway Dimensions", |
338 minResolution: 0, | 339 minResolution: 0, |
339 source | 340 source |
340 }); | 341 }); |
341 })(), | 342 })(), |
342 (function() { | 343 (function() { |
343 const source = new VectorSource(); | 344 const source = new VectorSource({ strategy: bboxStrategy }); |
344 source.setLoader( | 345 source.setLoader( |
345 buildVectorLoader( | 346 buildVectorLoader( |
346 { | 347 { |
348 geometryName: "area", | |
347 featureTypes: ["fairway_dimensions"], | 349 featureTypes: ["fairway_dimensions"], |
348 filter: equalTo("level_of_service", 2) | 350 filter: equalTo("level_of_service", 2) |
349 }, | 351 }, |
350 source, | 352 source, |
351 true | 353 false |
352 ) | 354 ) |
353 ); | 355 ); |
354 return new VectorLayer({ | 356 return new VectorLayer({ |
355 id: "FAIRWAYDIMENSIONSLOS2", | 357 id: "FAIRWAYDIMENSIONSLOS2", |
356 label: "LOS 2 Fairway Dimensions", | 358 label: "LOS 2 Fairway Dimensions", |
360 minResolution: 0, | 362 minResolution: 0, |
361 source | 363 source |
362 }); | 364 }); |
363 })(), | 365 })(), |
364 (function() { | 366 (function() { |
365 const source = new VectorSource(); | 367 const source = new VectorSource({ strategy: bboxStrategy }); |
366 source.setLoader( | 368 source.setLoader( |
367 buildVectorLoader( | 369 buildVectorLoader( |
368 { | 370 { |
371 geometryName: "area", | |
369 featureTypes: ["fairway_dimensions"], | 372 featureTypes: ["fairway_dimensions"], |
370 filter: equalTo("level_of_service", 3) | 373 filter: equalTo("level_of_service", 3) |
371 }, | 374 }, |
372 source, | 375 source, |
373 true | 376 false |
374 ) | 377 ) |
375 ); | 378 ); |
376 return new VectorLayer({ | 379 return new VectorLayer({ |
377 id: "FAIRWAYDIMENSIONSLOS3", | 380 id: "FAIRWAYDIMENSIONSLOS3", |
378 label: "LOS 3 Fairway Dimensions", | 381 label: "LOS 3 Fairway Dimensions", |