Coder Social home page Coder Social logo

rrosenlof / road-to-nowhere Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 6.35 MB

A simple game where you view an overhead map satellite image and guess the location

Home Page: https://road-to-nowhere.netlify.app/

License: BSD Zero Clause License

JavaScript 92.64% CSS 7.36%
mapquest gatsby

road-to-nowhere's Introduction

Road to Nowhere

Description: This app shows a semi-random overhead image of a map, using MapQuest Static API. The user then enters a guess for the location of the image and then can see the right answer. Made with Gatsby in July, 2020, and deployed with Netlify here: https://road-to-nowhere.netlify.app/

How to Run Locally

  • Download the repo.
  • Run npm install in the root of the project.
  • If you haven't already, install the Gatsby CLI on your machine. npm install -g gatsby-cli.
  • Create .env.development and .env.production files in the root directory. In each of these files, simply add:
GATSBY_MAPQUEST_KEY=<YOUR_API_KEY_HERE>

See the next section for info on the key and API usage.

  • In the project, run gatsby develop, which will run a local instance of the project at http://localhost:8000.

API Usage

This project uses the MapQuest API, to generate the images of the maps. To get the API key, you'll need to register with MapQuest, which is free. MapQuest has a good, free tier for their API services.

Another option is to use the Google Maps Static API, which provides an almost identical service. This API loads faster than MapQuest, however Google's version shows ownership on the image, which usually gives away the location. So road maps are better for this task. To use this, simply change the map URL in the pages/index.js file to match Google's information.

Deployment

This app is currently deployed to Netlify here: https://road-to-nowhere.netlify.app/

Next Steps

A to do list:

  • Think of a better name for the project? This works though...
  • Improve the gameplay UX
    • Use the Google Autocomplete for entering guesses for location?
    • Keep track of a score
    • Change unlimited play to a set of questions
    • Show a 'distance off from correct' score?
  • More styles? Colors? At least update the site icon!!
  • Allow users to change settings they play with:
    • Zoom level
    • Road or Sat view
    • Details included (Can't really add too many)
    • Which datasets to include (Several in the project, but easy to add more with list of coordinates). Also, currently using US locations only, since guesses are made based on states. How to change to guess cities, states, countries, etc.?

road-to-nowhere's People

Contributors

rrosenlof 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.