0

I'm currently playing around with deck.gl.

Taking the UK accident example (3d-heatmap). How can I change the language used to display the POI in mapboxGL?

Where should I put the mapboxGL equivalent of:

map.setLayoutProperty('country-label-lg', 'text-field', '{name_fr}');
Bjorn Reppen
  • 22,007
  • 9
  • 64
  • 88
AlainRo
  • 1
  • 2

1 Answers1

1

This is mostly related to the usage of react-map-gl rather than deck.gl, given that's what the example is using.

You can grab the mapbox map instance using the getMap() method of the < MapGL> component, and call the method to change the layout property:

<MapGL ... ref='map' />

const map = this.refs.map.getMap()
map.setLayoutProperty('country-label-lg', 'text-field', '{name_fr}')
Preview
  • 35,317
  • 10
  • 92
  • 112