How to use the react-map-gl/utils/style-utils.getInteractiveLayerIds function in react-map-gl

To help you get started, we’ve selected a few react-map-gl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / react-map-gl / test / src / utils / style-utils.spec.js View on Github external
test('getInteractiveLayerIds#JS style', t => {
  const layers = getInteractiveLayerIds(TEST_STYLE_JS);
  t.equal(deepEqual(layers, ['interactive']), true, 'got expected layer ids');
  t.end();
});
github uber / react-map-gl / test / src / utils / style-utils.spec.js View on Github external
test('getInteractiveLayerIds#String style', t => {
  const layers = getInteractiveLayerIds(TEST_STYLE_STRING);
  t.notOk(layers, 'should not return layer ids');
  t.end();
});
github uber / react-map-gl / test / src / utils / style-utils.spec.js View on Github external
test('getInteractiveLayerIds#Immutable style', t => {
  const layers = getInteractiveLayerIds(TEST_STYLE_IMMUTABLE);
  t.equal(deepEqual(layers, ['interactive']), true, 'got expected layer ids');
  t.end();
});