uber / nebula.gl

A suite of 3D-enabled data editing overlays, suitable for deck.gl

Home Page:https://nebula.gl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use utf-8/unicode symbols in modeConfig.formatTooltip when using Measure modes

ivan-palatov opened this issue · comments

Describe the bug

When using utf-8 symbols such as ² they get ignored in modeConfig.formatTooltip property of measure modes (eg. MeasureDistanceMode).

Actual Result

There are no utf symbols shown

Expected Result

The special characters should be shown

Reproduce Steps

  1. Set mode to MeasureDistanceMode
  2. Set modeConfig.formatTooltip to
(distance) => `${distance} m²`
  1. Done

For future refs, the problem was solved by setting characterSet: 'auto' in tooltips subLayerProps:

new EditableGeoJsonLayer({
  id: 'editable-geojson',
  // ... other params,
  _subLayerProps: {
    tooltips: {
      characterSet: 'auto'
    }
  }
});