GithubHelp home page GithubHelp logo

geopuzzle's Introduction

GeoPuzzle

This game tests your geography skills by let you dragging and matching each polygon against the correct position on the map. Inspired on Luke Mahe's hack on GMaps draggable polygons.

Demo

Swiss Cantons Swiss Cantons

Requirements

  • a webserver(i.e. Apache)

Setup

  • clone / download the project to a location that can be accessible via your webserver
  • access the project in your browser (i.e. http://localhost/geopuzzle/ )

Customize the game for your area

  • Grab a GeoJSON file for your area of interest. Not sure how to get/make one ? Contact me and I will try to help you.

  • Edit the config: static/map.js - app_config variable

      geojson_feeds: {
          Cantons: 'geojson/G3K12.geojson'
      },
      area_mask_fusion_tables_query: null,
      styles: {
          polygon_draggable: {
              strokeColor: "#FF0000",
              strokeOpacity: 0.8,
              strokeWeight: 2,
              fillColor: "#FF0000",
              fillOpacity: 0.1
          },
          polygon_final: {
              strokeColor: '#347C17',
              fillColor: '#347C2C',
              fillOpacity: 0.8
          }
      }
    
    • geojson_feeds: Local paths for the GeoJSON files containing the polygons

    • styles: PolygonOptions objects for the entities that are draggable / fixed

    • area_mask_fusion_tables_query: FusionTablesQuery object representing a mask polygon that highlights the area of interest.

      Example for Switzerland boundaries mask

        {
        	select: 'geometry',
        	from: '1tDHsjdz7uhhAmWlmmwjR1P2Huf2LKMMiICPVdw',
        	where: 'id = 1'
        }
      

      If set to null, no mask will be displayed

What's next ?

Stay in touch

Just contact me if you are not a programmer and / or need help in building a similar game for your region/country.

Contributors

Have fun !

geopuzzle's People

Contributors

vasile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

geopuzzle's Issues

precision

Is there a way to adjust the precision of the drop? It looks like the alignment has to be perfect for the polygons to lock in place. Any way to edit this?

Thanks

After clicking on new game, delete all the polygons

To reproduce:

  1. start a game
  2. move some polygons on the map
  3. click on the new game button
  4. it goes back to the home page and you still see the polygong from your last game

Expected behaviour:

  1. it goes back to the home page and deletes the polygons from your last game

Screenshot:

Snapshot 3:15:13 6:48 PM

Argumentation:

  1. you can actually still play the game by moving the polygons
  2. if you actually can't really go back to the game (it's not a pause button) then there's no reason to still see the polygons

Don't replace the polygone with a new one if the last one set is not the last one given

To reproduce

  1. Move the first polygon
  2. Click on stuck. A second one appears.
  3. Now place the first polygon at the right place without moving the second polygon.
  4. The polygon two gets replaces by a polygon three

Expected behaviour:
4. I don't get a new polygon as there is still some to place

Let me know if you don't agree and I'll explain the logic more in details.

Landing page for mobile devices

Feature:

Build a landing page to display to users browsing with mobile phones that this game is only meant to be played on a desktop.

Argumentation:

Most of the shared scores on twitter and some other links on social website will be opened on mobile devices.

multitouch

Any way to add multi-touch support? Drag two or more at the same time?

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.