openkfw / Oscar

A digital decision support system for humanitarian operations
https://www.oscarplatform.org/
GNU General Public License v3.0
11 stars 1 forks source link

89 show multiple regions layers #97

Closed srezacova closed 2 years ago

srezacova commented 2 years ago

Description

Show multiple region layers. Create layerOptions in mapLayers config.

How has this been tested?

TEST singleLayer: true with 2 timeseries layers behavior:

    referenceId: 'DailyCovid19Cases',
    date: new Date(now - 1 * oneDay).toISOString(),
    csvFileName: 'daily_cases_test/Daily_Covid19_cases1.csv',
  },
  {
    referenceId: 'DailyCovid19Cases',
    date: new Date(now - 2 * oneDay).toISOString(),
    csvFileName: 'daily_cases_test/Daily_Covid19_cases2.csv',
  },
  {
    referenceId: 'DailyCovid19Cases',
    date: new Date(now - 3 * oneDay).toISOString(),
    csvFileName: 'daily_cases_test/Daily_Covid19_cases3.csv',
  },
  geoReferenceId: "slovakiaRegions"
  layerType: "regions"
  category: "Baseline data"
  title: "Daily Covid-19"
  attribute: "Daily Covid19 Cases"
  attributeDescription:
    descriptionText: "COVID-19 New Cases: {{Daily Covid19 Cases}}"
    featureText: "{{featureId}} kraj"
  featureId: "name"
  style:
    fillColor:
      type: "colormap"
      value: "green"
    min: 0
    max: 100
    strokeColor:
      type: "color"
      value: "rgba(255,255,255,0.2)"
  legend:
    - type: "colormap"
      color: "green"
      min: 0
      max: 100
  metadata:
    description: "Sample data created just for this purpose. Do not represent the reality in any time."
    updateFrequency: "never"
    unit: "n/a"
    dataRetrievalDescription: "Data was randomly created."
  layerOptions: 
    singleDisplay: false   
    timeseries: true

Leave singleDisplay false for both timeseries layers to check functionality with more sliders shown on the map. Change singleDisplay to true in other layers for checking singleDisplay functionality. Add maxResolution: 1000 to any of the layers to check if it works.

Run ./start.sh, ./runinitialload.sh with COUNTRY=Sample. Check layers on the map. Now you have 2 timeseries layers for testing purposes, one in Baseline data and one in Covid-19. You can add one more for testing purposes.

Screenshots (if appropriate):

Types of changes

Checklist:

srezacova commented 2 years ago

Hi, mark 'timeseries' on top level as deprecated in release notes

So I will add this in CHANGELOG.md?

[1.3.1] - 2021-12-29

Deprecated

or something like that?

bariela commented 2 years ago

Hi, mark 'timeseries' on top level as deprecated in release notes

So I will add this in CHANGELOG.md?

[1.3.1] - 2021-12-29

Deprecated

  • 'timeseries' key on top level is now deprecated, it is moved to 'layerOptions' key

or something like that?

in the unreleased part for now, as we don't make new release just for this feature and with more specification, so the reader can understand what and where exactly should be changed

srezacova commented 2 years ago

Hi, mark 'timeseries' on top level as deprecated in release notes So I will add this in CHANGELOG.md?

[1.3.1] - 2021-12-29

Deprecated

  • 'timeseries' key on top level is now deprecated, it is moved to 'layerOptions' key

or something like that?

in the unreleased part for now, as we don't make new release just for this feature and with more specification, so the reader can understand what and where exactly should be changed

I fixed this in release notes.