🌍 React Map Component for Searchkit
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo/src merge next (#5) Apr 27, 2018
site add gif Oct 30, 2016
src merge next (#5) Apr 27, 2018
tests add basic test Jan 10, 2017
.gitattributes initial commit Oct 30, 2016
.gitignore merge next (#5) Apr 27, 2018
.travis.yml merge next (#5) Apr 27, 2018
README.md merge next (#5) Apr 27, 2018
nwb.config.js merge next (#5) Apr 27, 2018
package-lock.json merge next (#5) Apr 27, 2018
package.json merge next (#5) Apr 27, 2018
yarn.lock merge next (#5) Apr 27, 2018

README.md

searchkit-geomap

npm

build status

Map component for Searchkit

searchkit-geomap

Installation

yarn add searchkit-geomap --save

Features

  • GeoMap : Display aggregations on a MapGL map using Mapbox with react-map-gl.

Example

import React, { Component } from "react";
import { GeoMap } from "searchkit-geomap";

const host = "http://demo.searchkit.co/api/crimes";
const searchkit = new SearchkitManager(host);
const opts = {
  width: 800,
  height: 600,
  latitude: 37.7577,
  longitude: -122.4376,
  mapboxApiAccessToken: "key"
};

class Demo extends Component {
  render() {
    return (
      <SearchkitProvider searchkit={searchkit}>
        <Layout>
          <TopBar>
            <SearchBox autofocus={true} searchOnChange={false} />
          </TopBar>
          <LayoutBody>
            <LayoutResults>
              <GeoMap {...opts} />
            </LayoutResults>
          </LayoutBody>
        </Layout>
      </SearchkitProvider>
    );
  }
});

render(<Demo />, document.querySelector("#demo"));

Development

  • git clone https://github.com/gaving/searchkit-geomap.git
  • yarn
  • yarn start

License

MIT