Giter VIP home page Giter VIP logo

wikivoyage-districtifier's Introduction

wikivoyage-districtifier's People

Contributors

arr8 avatar rene78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

arr8

wikivoyage-districtifier's Issues

Malformed longitude value

Sometimes the longitude values of the bounding box are malformed (long < -180° || long > 180°).
Happens when zooming all the way out so that "many worlds" are visible and then panning to one of the "neighbouring worlds".
Unbenannt
Possible fixes:

  1. Leaflet/Leaflet#1885 (comment)
  2. Don't allow to zoom out so much.

Error when deleting district above last

Something is wrong, if one tries to delete any but the last district. Problem most probably related to numbering of "item" classes and "WikidataIds" array.

Issue with download of polygons

  • "Make request to overpass dependent on current zoom level of map." Not always a good solution (e.g. Seoul districts have admin_level 6. They only show up, when zoomed out too far).
    Instead: Beginning from a minimum zoom show everything.

Improvements regarding checkmark

  • Activate checkmark (checked="checked") on newly added district
  • If district with checked checkmark is deleted --> check the checkmark of first district

Undo functionality

After each change save a version of "wikidataIds" in a new variable. For this it is best to change "wikidataIds" to an object similar to this:

var wikidataIds = {
//"key":  values (an object with a string and an array in this case)
    "0": 	{name:"District 1", ids: [1,2,3]},
    "1": 	{name:"District 2", ids: [4,5,6]}
};

//Access values
console.log(wikidataIds["0"].name); //Brackets needed because of number-only key name
console.log(wikidataIds["0"].ids[1]);
//Or like that
var x=0;
console.log(wikidataIds[x].name);

//Change value
wikidataIds["0"].name="Eastern District";
console.log(wikidataIds);

Improve CSS Grid layout

Make sure that all elements fill out screen completely in vertical direction on large screens. For this the navbar and details ("help") needs to be added to "#content" grid and change value "height: 100vh;". See this stackoverflow post

Download OSM boundaries on-the-fly

  • On-the-fly download of OSM admin boundaries with help of overpass and maybe this plugin:
    Leaflet Overpass Layer.
    Try to have checkmarks on the map in order to show/hide certain "admin_levels".
  • Alternative: Kartographer already uses a simplified polygon for each Wikidata ID. Maybe there is some way to tap this?

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.