Git Product home page Git Product logo

locations-map-exercise's Introduction

BentoBox Locations Map Excercise

This exercise requires you to display 25 random BentoBox locations on a map in React.

Use whatever other tools you think are best to accomplish the requirements below (for example, local component state using setState(), Redux, MobX, etc).

We're primarily interested in seeing how you structure and implement a small JavaScript project so there is no requirement to spend a lot of time on styling (though it should be presentable). However, if CSS is your strength, feel free to make it beautiful!

We estimate this exercise will take somewhere between 2-3 hours to complete. Please attempt to write modular, reusable code, where possible.

Instructions

  1. Fork this repository.
  2. Install dependencies with npm install or yarn.
  3. Run npm start or yarn start. This should start a webpack dev server, and the app should be accessible at http://localhost:8080/
  4. When you're done, please open a pull request and send us an email letting us know you're done.

If you have any problems getting the app started or installing the dependencies, please let us know.

Location Data

src/helpers/api.js contains the function fetchLocations which will fetch 25 random locations from BentoBox. It is currently called in <App />, but feel free to move it to whichever component you think makes the most sense.

Requirements

  1. When fetchLocations() is called, display an indication to the user that the locations are loading (this could be a loader or a simple message).

  2. Based on the response from fetchLocations(), place corresponding pins on a map (use whatever mapping library you choose).

  3. Add tooltips that open when clicking a pin. The tooltip should contain the name and address of the location, as well as a button to "view details.""

  4. When a user clicks on "view details", this should display all the location data (e.g., name, address, an image, and hours if present in response, etc.) somewhere else on the page. For example, you could have the map on one side of the screen and the selected location details on the other, or you could display the details in a modal.

Optional

  1. If more than one image is returned by the API for a given location, display an image slider.
  2. Implement undo/redo functionality to cycle through the previously selected locations.

locations-map-exercise's People

Contributors

ericfries avatar pdr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.