Giter Club home page Giter Club logo

moziox's Introduction

Moziox

Test project to show skills with django, javascript, html css.

The idea of the project is to be able to set a Service area in a google map and save it. There's another page where the user can select the service area to use, and play to click on the map and guess if the point is inside the selected service area.

you can take a look at it here: http://moziox-env-yvx3mwxmzm.elasticbeanstalk.com/

how to use:

  • The main page (/):
    • The user can create polygons clicking on the map, to close the polygon the user must click on the first point of the polygon again.
    • The user can create all the polygons he wants.
    • The points can be dragged to change the shape of the polygon, no matter if the point its not in the last created polygon.
    • Hovering with the mouse over the points will show its coordinates.
    • The user can clear and start again using the clear button.
    • After the polygons are created, the user has to enter a name for the service area and save.
    • if everything went right, the user should click on next button to start playing!.
  • The "find" page (/find):
    • The user can select a service area from a drop down, by default the most recent one will be selected.
    • The user clicks on the map, if he hits outside of a polygon of the selected service area a green dot will be drawn, otherwise a red dot will be drawn.
    • Also theres a text in the headers to call the atention of the user to check if he missed or hit.

About the Code:

  • This is a django project, with a small backend used just to store the service area, and to glue the different parts of the app (forms, views, templates).
  • I decided to use Django gis, for this little app it may be an overkill, but if the backend grows or there's a need to store and do calculations using geographic data. django gis is the way to go.
  • Most of the magic happens in the javascript files.
    • map.js: contains the code that interact with google maps.
    • main.js: contains the code that uses the class in map.js and deals with the ui when creating a service area.
    • find.js: contains the code that uses the class in map.js and deals with the ui when playing to guess if a point is inside a service area.

Deploy:

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.