gatsby-source-statshunters

1.0.0 • Public • Published

gatsby-source-statshunters

Npm version Npm downloads MIT license PRs welcome

gatsby-source-statshunters is a Gatsby plugin to use StatsHunters as a data source and display explorer tiles.

What are StatsHunters explorer tiles?

Usage

  1. Download gatsby-source-statshunters from the NPM registry:
yarn add gatsby-source-statshunters
  1. Add the plugin in your gatsby-config.js file

ℹ️ Login to StatsHunters and copy the API key from the settings page.

module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-statshunters",
      options: {
        api_key: process.env.STATSHUNTERS_KEY,
      },
    },
  ],
}
  1. query data and enjoy
statsHunters {
  square
  tiles
  cluster
}

square, tiles and cluster are arrays of [lat,lng] coordinates.

  1. Display your tiles with your favorite map library

gatsby-source-statshunters

You can checkout how to use it in the example folder.

Contributing

  • ⇄ Pull/Merge requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.

License

This project is licensed under the MIT License - see the LICENCE file for details

Thanks

I wanted to thank Stan Ansems once again for making StatsHunters and allowing me to use the api to create this plugin. If you like statshunters, consider making a donation

Package Sidebar

Install

npm i gatsby-source-statshunters

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

6.97 kB

Total Files

5

Last publish

Collaborators

  • cedricdelpoux