Skip to content

wipfli/maplibre-feature-properties-transform-example

Repository files navigation

Feature Properties Transform

Description of idea see

maplibre/maplibre-gl-js#4198

Source code see

maplibre/maplibre-gl-js#4199

Demo

String Manipulation

Make the third letter uppercase with JavaScript code:

https://wipfli.github.io/maplibre-feature-properties-transform-example/

Language Logic

Display labels in multiple languages and scripts with logic based on regular expressions.

https://wipfli.github.io/maplibre-feature-properties-transform-example/language

Text Shaping with HarfBuzz

Shape Hindi text labels with HarfBuzz.

Note: it may take some seconds for HarfBuzz and the font resources to be ready. Tiles loaded initially will show wrong Hindi labels. So zoom out, load the map, then zoom in to get correctly shaped labels.

https://wipfli.github.io/maplibre-feature-properties-transform-example/hb

Live Weather

Request live weather with fetch and store temperature in the feature properties.

https://wipfli.github.io/maplibre-feature-properties-transform-example/live-weather/