Skip to content

Commit

Permalink
CDC #248 - Fixing an issue with map styles between Peripleo and React…
Browse files Browse the repository at this point in the history
…MapGL
  • Loading branch information
dleadbetter committed Jul 23, 2024
1 parent 83457bc commit fcb93f3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
6 changes: 3 additions & 3 deletions packages/geospatial/src/components/GeoJsonLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const GeoJsonLayer = (props: Props) => (
);

GeoJsonLayer.defaultProps = {
fillStyle: MapStyles.fill,
pointStyle: MapStyles.point,
strokeStyle: MapStyles.stroke
fillStyle: MapStyles.fill.paint,
pointStyle: MapStyles.point.paint,
strokeStyle: MapStyles.stroke.paint
};

export default GeoJsonLayer;
47 changes: 28 additions & 19 deletions packages/geospatial/src/utils/MapStyles.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
// @flow

const point = {
'circle-radius': [
'interpolate',
['linear'],
['number', ['get', 'point_count'], 1],
0, 4,
10, 14
],
'circle-stroke-width': 1,
'circle-color': [
'case',
['boolean', ['feature-state', 'hover'], false],
'#3b62ff',
'#ff623b'
],
'circle-stroke-color': '#8d260c'
type: 'circle',
paint: {
'circle-radius': [
'interpolate',
['linear'],
['number', ['get', 'point_count'], 1],
0, 4,
10, 14
],
'circle-stroke-width': 1,
'circle-color': [
'case',
['boolean', ['feature-state', 'hover'], false],
'#3b62ff',
'#ff623b'
],
'circle-stroke-color': '#8d260c'
}
};

const fill = {
'fill-color': '#ff623b',
'fill-opacity': 0.2
type: 'fill',
paint: {
'fill-color': '#ff623b',
'fill-opacity': 0.2
}
};

const stroke = {
'line-color': '#ff623b',
'line-opacity': 0.6
type: 'line',
paint: {
'line-color': '#ff623b',
'line-opacity': 0.6
}
};

export default {
Expand Down

0 comments on commit fcb93f3

Please sign in to comment.