Help with multiple regions in Regionmapping.json not working

30 views
Skip to first unread message

Andrés Maldonado

unread,
Mar 30, 2020, 11:11:34 PM3/30/20
to TerriaJS
Hello there,

I hope you can give me a hand on this as I'm stucked and out of options  here:
I've set up a region that loads vector tiles. It works well whenever I just use one item in the regionWmsMap key, but if I add another item, then only the first item from the top gets loaded over the map when adding its related data. If I switch the order, the first item will be rendered but not the second one.
I've added my project to the following repo: https://github.com/rulight/hilzip
Or if you want to give a quick look to my regionmapping.json, here it is:
{
  "regionWmsMap": {
    "HIL_ZIP_2010": {
      "layerName":"HIL_ZIP_2010",
      "serverType""MVT",
      "serverMinZoom"8,
      "serverMaxZoom"11,
      "regionIdsFile""data/regionids/region_map-HIL_ZIP_2010.json",
      "regionProp""GEOID10",
      "nameProp":"Name",
      "aliases": ["GEOID10"],
      "description""HIL ZCTA",
      "bbox": [
        -82.82366904
         27.57054998,
        -82.05401201,
         28.17337897
      ]
    },
    "DES_ZIP_2010": {
      "layerName":"deszip2010",
      "serverType""MVT",
      "serverMinZoom"8,
      "serverMaxZoom"11,
      "regionIdsFile""data/regionids/region_map-DES_ZIP_2010.json",
      "regionProp""GEOID10",
      "nameProp":"Name",
      "aliases": ["GEOID10"],
      "description""DES ZCTA",
      "bbox": [
        -82.2274830000000065
        27.0317000000000007,
        -81.5621840000000020,
        27.3407020000000003
      ]
    }

  }
}


I'd really appreciate your help on this one.

Cheers!

stev...@gmail.com

unread,
Mar 30, 2020, 11:31:26 PM3/30/20
to TerriaJS
Hi Andrés,

The aliases you assign to different region types should be unique. They are used to match a column in a CSV to the region type and that doesn't work if the aliases aren't unique. If for some reason you can't change the CSV column names and you have to use them as is you can force the CSVs to use the correct region type in catalog json:

{
   
"type": "csv",
   
"tableStyle": {
       
"regionType": "DES_ZIP_2010",
       
"regionVariable": "GEOID10"
   
}
}

Stephen

Andrés Maldonado

unread,
Mar 31, 2020, 12:32:43 AM3/31/20
to TerriaJS
Thanks a lot Steven! That was it mate! 
Cheers!
Reply all
Reply to author
Forward
0 new messages