Skip to content

Latest commit

 

History

History
executable file
·
69 lines (49 loc) · 1.21 KB

README.md

File metadata and controls

executable file
·
69 lines (49 loc) · 1.21 KB

DarkSky

HomePage Screenshot


Table of Contents


Introduction

Explore the weather in other cities with DarkSky Maps. This simple example shows how easy it is to get started with AnalystBoxFrontend!


Frontend

Setup

Follow along to get the demo up and running!

  1. Navigate to frontend

    $ cd path_to/darksky/frontend
  2. Install dependencies

    $ npm ci
  3. Run

    $ npm run start

AnalystBoxFrontend in Action

Here's what to look for in App.js:

// ...
<AnalystBox
  questions={this.cities.map((city) => `show me ${city}`)}
  onQuestionSelect={({ questionIndex }) => {
    const [latitude, longitude] = this.latitudelongitudes[questionIndex];
    this.setState({ latitude, longitude });
  }}
  keywords={this.cities}
  searchOptions={{
    maxResults: 6,
    engines: {
      triePrefixSearch: { shouldCache: false },
      linearSubstringSearch: {},
    },
  }}
/>
// ...