mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-25 16:02:50 +00:00
- Add geojson example - Add introduction, credit and link to source to all examples - CSS bug fixes - Remove unused website components - Header image
30 lines
682 B
JavaScript
30 lines
682 B
JavaScript
import {fromJS} from 'immutable';
|
|
import MAP_STYLE from '../../map-style-basic-v8.json';
|
|
|
|
// For more information on data-driven styles, see https://www.mapbox.com/help/gl-dds-ref/
|
|
export const dataLayer = fromJS({
|
|
id: 'data',
|
|
source: 'incomeByState',
|
|
type: 'fill',
|
|
interactive: true,
|
|
paint: {
|
|
'fill-color': {
|
|
property: 'percentile',
|
|
stops: [
|
|
[0, '#3288bd'],
|
|
[1, '#66c2a5'],
|
|
[2, '#abdda4'],
|
|
[3, '#e6f598'],
|
|
[4, '#ffffbf'],
|
|
[5, '#fee08b'],
|
|
[6, '#fdae61'],
|
|
[7, '#f46d43'],
|
|
[8, '#d53e4f']
|
|
]
|
|
},
|
|
'fill-opacity': 0.8
|
|
}
|
|
});
|
|
|
|
export const defaultMapStyle = fromJS(MAP_STYLE);
|