Git Product home page Git Product logo

map-app's Introduction

code style: prettier

Neighbourhood Maps


Description

This repo contains the code for the Neighbourhood Maps, Google API project for the React portion of the Udacity FEND course. The app displays several navy related places of interest in Portsmouth, UK. The city has a long history associated with the Royal Navy.

Quickstart

Follow these steps to open the app in your default browser.

  1. Clone the repo
  2. cd into the build directory and run npm install
  3. Run npm run build
  4. Run npm install -g serve
  5. Run serve -s build
  6. Open a new browser tab and enter 'localhost:5000' in the address bar then press enter.

API Connection errors

If the fetch API call to the Google Maps API does not return a response of 200 then a modal will pop up to advise checking the internet connection. This can be tested by deleting characters from the API call in index.html (just remember to put them back afterwards!).

The information for the infowindows is retrieved by an API call to the FourSquare API. A modal will pop up to inform of any issue regarding connection to the FourSquare API, again advising to check the internet connectivity.

create-react-app

This project was bootstrapped with Create React App. You can find more information on how to perform common tasks here.

Built on top of the starter template.

Usage

The sidebar (nav) will start closed on smaller screens to provide more real-estate for the map view. The text input can be used to filter the POIs available for view. The sidebar items will be prefixed by an alphabetical character that corresponds with its associated marker on the map.

Clicking on a sidebar item will activate the marker and open an info window which will display address information from FourSquare, a third-party API. A subsequent click will close the window. On smaller screens, opening an info window will close the sidebar.

For users not using a mouse, the items can be activated by tabbing to the item and pressing enter. As with the mouse click, a second 'enter' will close the info window.

When the sidebar is hidden it can be revealed by clicking/pressing 'enter' on the 'hamburger' menu icon.

Contributing

Always happy to collaborate. If you have any questions or even comments to offer regarding coding approaches for more effective/concise code please reach out via email.

Credits

Thank you to the team that created SweetAlert2 to enable getting away from the default browser alert modals.

API References:

License

This code is distributed under the MIT license.

map-app's People

Contributors

shayghc avatar

Watchers

James Cloos avatar  avatar

map-app's Issues

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.