DEV Community

Hidenori FUJIMURA
Hidenori FUJIMURA

Posted on

What I learned from GSI Maps Vector style.json

Here are quick notes from what I learned from GSI Maps Vector style.json.

Sources

Fonts used

NotoSansCJKjp-Regular. Because they are using a relatively old version of the Mapbox GL JS, the font data are downloaded and then rendered.

Layers

A lot of layers are there.

Style

They are not using modern expressions. With modern expressions, you can rewrite filters like

filter: [
  "all",
  [
    "==",
    "ftCode",
    7541
  ]
]

Enter fullscreen mode Exit fullscreen mode

into

filter: [
  "match",
  [
    "get",
    "ftCode"
  ]
  [
    7541
  ]
  true
  false
]
Enter fullscreen mode Exit fullscreen mode

Top comments (0)