searchkit-geomap
Map component for Searchkit
Installation
npm install searchkit-geomap --save
Features
- GeoMap : Display aggregations on a MapGL map using Mapbox with react-map-gl.
Example
; const host = 'http://demo.searchkit.co/api/crimes';const searchkit = host;const opts = width: 800 height: 600 latitude: 377577 longitude: -1224376 mapboxApiAccessToken: 'key'; const Demo = React
Note on using Webpack
Due to some issues with Mapbox and Webpack, add the following to your webpack config if you experience errors building:-
var path = require('path');
...
node: {
console: true,
fs: 'empty',
net: 'empty',
tls: 'empty'
},
resolve: {
alias: {
'mapbox-gl/js/geo/transform': path.join(__dirname, 'node_modules/mapbox-gl/js/geo/transform'),
'mapbox-gl': path.join(__dirname, 'node_modules/mapbox-gl/dist/mapbox-gl.js')
}
}
License
MIT