Code Monkey home page Code Monkey logo

israelhikingmap / site Goto Github PK

View Code? Open in Web Editor NEW
75.0 10.0 30.0 522.08 MB

Israel Hiking Map has maps, route planning, and travel information for Israel. This repository holds the files needed for running the Israel Hiking Map site and apps.

Home Page: https://israelhiking.osm.org.il/

License: Other

CSS 1.21% TypeScript 55.11% HTML 5.91% JavaScript 0.10% C# 36.78% Dockerfile 0.03% Shell 0.02% Python 0.06% SCSS 0.50% Java 0.12% Swift 0.11% Ruby 0.05%
hacktoberfest navigation app maps typescript maplibre-gl-js

site's Introduction

Intro

This repository holds the main server side module the web and mobile clients interact with, it also hold the web and mobile related code.

Codecov

Site's uptime

Architecture Diagram

image

Technology stack

The technology stack of this site is based on the following frameworks:

Server Side

Client Side

Architecture and folder stucture of the client side

The architecture is based heavily on Angular:

  • application - where all the application code is, topmost folder.
    • components - this layer handles the UI calls and bindings along with the relevant css and html files.
    • directives - folder for all the directives.
    • models - used to store data types that are common to the entire app.
    • reducers - used for redux reducers, actions and payloads.
    • services - this layer holds the lower level data handling.
      • layers - where the layers logic is - POI, route, wiki, nakeb, relevant services, etc...
  • content - used for images and static content.
  • environments - used for angular-cli to define production and dev variables.
  • fonts - icomoon generated font for icons instead of images.
  • scss - used for global style files
  • translations - all relevant data related to i18n.

Architecture and folder stucture of the server side

The architecture is based on layers:

  • Contollers - the topmost layer to catch all the requests
  • Services - responsible for orchestrating executors
  • Converters - converters logic between types of geo structures
  • Executers - basic logical building blocks
  • DataAccessInterfaces - a slim layer to decouple business logic from data access
  • DataAccess - database, file system and network request are processed in this layer
  • Common - Mainly for POCOs

Setting Up the Project for site Development (To setup iOS and Android follow the capacitor guides)

In order to be able to build this site you'll need some tools:

  • Install Docker
  • Install .Net core SDK 7.0
  • Install node.js (20+).
  • Run from command line dotnet restore and after that dotnet build
  • Go to IsraelHiking.Web and run from command line:
    • npm install to install all npm packages for the client side code
    • npm run build to generate the Angular UI client. It should create wwwroot folder on a successful run
  • Run docker compose up graphhopper - it should fail for the first time
  • Run gh-update.ps1 (set chmod +x if needed) to generate the graphhopper routing data
  • Run docker compose up to load the rest of the sercives
  • Run dotnet run --project IsraelHiking.Web
  • If you want to update the translations or upload images from your debug environment, you'll need to add the following secrets to IsraelHiking.Web. Otherwise, skip this step.
    2017-10-22 10_47_32-
    In the secrets.json at the end there should be these fields.
    {
      "wikiMediaUserName": "your wikimedia user",
      "wikiMediaPassword": "your wikimedia password"
      "imgurClientId": "your imgur client ID"
    }
    

Starting a debug session

See the relevant page in our wiki

site's People

Contributors

amiad avatar atgardner avatar dependabot[bot] avatar harelm avatar israelhikinghost avatar migolan avatar moshfeu avatar nataly87s avatar nonzero avatar oferze avatar papastepano avatar zstadler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

site's Issues

Rename the "+ Add Route" button to "+ New Route"

"+ Add route" seems to hint that a new route is created from an external source, much like the "+ Add Base Layer" and "+ Add Overlay Layer" in the same popup window. Such functionality is provided by the "open a file" button on the left of the screen.

The functionality of this button is to create a new empty route for editing, therefore the "+ New Route" seems more appropriate.

Better "middle marker" support

As I user I would like to be able to add a mid route point from any exiting route position, not just from specific points like it is now.

Polygon vs. auto-routing mode

When switching to polygon mode, all the previously-constructed auto-routed track goes poly.
This makes it impossible to manually skip over missing portions or disconnected trails in OSM.
Since OSM mapping is far from complete, you'r bound to need manual portions when planning anything but very short routes.

KM marks

Can be useful. Should be minimal and optional.

prompt for file name when saving

Saves time for opening the containing folder and renaming and prevents the mess of many similarly named files in the download folder.
You can leave the default file name there for the lazy.

Route Length

As a user I would like to know the total distance of the current route I'm drawing.

Indicate activation of "i" and "?" buttons

When either the "i" or "?" buttons is active, create an orange border around them, just as in other mode buttons.
This will enable the user to know which button needs to be clicked in order to close the popup

Increase max zoom

Although your maps and layers go up to 16, custom ones can go higher.
Please allow deeper zooming in.

Manage route properties

It would also be nice to be able to rename routes - the first one is always "Route 0" while following ones can be named.
Maybe just attach one button to each route which would open a dialog box that would allow you to:

  1. show/hide
  2. change color (maybe also width and transparency)
  3. rename
  4. delete

Check for null responses from the router engine

Sometimes, the routing leaves empty segments. I suspect it is because the routing engine did not provide a valid response/in time. This is usually fixed by going out and back into routing mode.

I suggest the request will be re-sent once more to routing engine if the response is empty/invalid.

Route colors in legend

Could be nice if you use the colors in the map/route list, so you know which route is which if you have a few open.

Height graph: Resizeable

  1. Spread the height profile horizontally to the maximum possible. Once the route is long details are lost.
  2. Place it a bottom of page, where it is least likely to block the view.
  3. Better yet, use a draggable and stretchable box.
  4. Use much higher transparency, for the same reason

Height graph

As a user I would like to be able to see the current route's height data presented on a graph. this graph should be visible only when I need it - i.e. a pop-up like info or help.

Add indication of route being calculated

http://brouter.de/brouter-web/ uses animation of the dashed line.
Perhaps this will also solve the server response issues, as the brouter web client monitors the servers response and issues an error message when no response is received.

Variants of this path produce a timeout error:
http://brouter.de/brouter-web/#zoom=16&lat=33.30692&lon=35.77126&layer=OpenStreetMap&lonlats=34.903178,29.491142|35.771978,33.30747&nogos=&profile=trekking&alternativeidx=0&format=geojson

Put "Search" above "Layers"

Since the "Layers" button pup-ups the menu upon mouse-hover, and pushes the search button down, it is sometimes difficult to get to the search button.

If "Search" is placed above "Layers", the expansion upon mouse-hover will not move the search button

Enable deletion of search results' POIs

I could not find a way to remove from the map a POI created from a search.
I suggest a double-click will delete them, just as double-click deletes route points.

Select multiple nodes

With shift-clicking or shift-dragging an enclosing area.
It would simplify deleting multiple nodes from a route.

Route properties dialog box design

Would look better if elements take less space.
Color elements in the palette can be square.
Route width only requires 1 or 2 characters.

Avoid overriding the user's preferred OSM editor

Avoid overriding the user's preferred OSM editor by removing "?editor=id" from the URL created by the "Edit this map using OSM" button.

By the way, iD is anyway the default editor unless the user has explicitly chosen a different editor in the profile.

urls too long

With the current scheme you can only share a 150 point long route.
Worse yet a url with hundreds of characters is unwieldy. Hard to paste and ugly.
Buy http://ihm.org.il for 50 nis a year. (I'll chip in)
Shorten the url locally with software such as yourl.
http://yourls.org/

Add snappings to the map

As a user I would like the cursor to hang on existing routes when I draw my routes so that my route points will be better placed.

Popup for the Legend

Currently, by viewing the legend on the Kinneret, the user looses the viewpoint on the map.
I suggest using a pop-up for the Legend, same as the "i"/Information and "?"/Help.

A copy of the legend can continue to be included in the map in its current position.

Routing mode on by default

I suggest Routing mode would be enabled by default when entering edit mode.
Edit mode needs to stay disabled when entering the site, as is now.

Color palette

Light colors are not very useful.
Better 12 colors might be
000000
FF0000
FF6600
FF00DD
008000
0000FF
B700FF
00B0A4
9C7F00
9C3E00
7F9900
7F8282

Enable deletion and hiding of all POI's

I could not find a way to delete or hide all POI's.

When POIs are loaded from a file that includes dozens of POI's, it is not practical to delete or hide them one-by-one.

Legend box

Move the legend from the sea of Galilee to a switchable floating box so that users can consult it without leaving their position.

Smoother map switch

While switching to a new map source, it would be more visually appealing to temporarily keep displaying existing map tiles rather than wait for the new ones to load with gray background.

Smoother zoom

While zooming in or out when connection is slow, it would be more visually appealing to temporarily use stretched or shrinked versions of already-loaded tiles than to wait for the new ones to load with gray background.

Permalink fails

Add attribution to MTB map

Add
| Map style courtesy of <a http="http://mtbmap.no">MTBmap.no</a>|
to the attribution of the MTB map.

map and overlay behavior beyond max zoom

Right now they disappear or block further zooming.
Could be useful if you could see it enlarged at half the resolution.
Marked trails could still be useful on Google Earth at Z17 or 18.
limit max zoom to 20 or 21 though.

POI behavior

IMO, when clicked once, the text input box for naming should open in the edit mode and accept input without requiring 2 more clicks. Enter should also close the input box. Maybe the text should then hover above the POI?

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.