From cf391031f09cb39342b2602444d0b39e1fb201c9 Mon Sep 17 00:00:00 2001 From: orangemug Date: Sat, 27 Oct 2018 14:04:13 +0100 Subject: [PATCH 01/33] Added color swatch to --- src/components/map/FeatureLayerPopup.jsx | 80 +++++++++++++++++++----- src/components/map/MapboxGlMap.jsx | 14 ++++- 2 files changed, 78 insertions(+), 16 deletions(-) diff --git a/src/components/map/FeatureLayerPopup.jsx b/src/components/map/FeatureLayerPopup.jsx index 2d0eacb..516fc92 100644 --- a/src/components/map/FeatureLayerPopup.jsx +++ b/src/components/map/FeatureLayerPopup.jsx @@ -1,6 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import LayerIcon from '../icons/LayerIcon' +import {latest, expression, function as styleFunction} from '@mapbox/mapbox-gl-style-spec' function groupFeaturesBySourceLayer(features) { const sources = {} @@ -36,21 +37,72 @@ class FeatureLayerPopup extends React.Component { const items = Object.keys(sources).map(vectorLayerId => { const layers = sources[vectorLayerId].map((feature, idx) => { - return