1.0.0 • Published 7 months ago

gatsby-source-statshunters v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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