View on GitHub

The web tile maps viewer

Download this project as a .zip file Download this project as a tar.gz file

GaladrielMap

This is a web application – the tiles map viewer. The application can be placed on a weak server such as RaspberryPi or NAS and used on full clients such as tablets and smartphones. Only browser need.
It is assumed that the application is used in the onboard local area network of the boat or camper. The author uses it from the wi-fi router/GSM modem under OpenWRT as a server on his sailboat “Galadriel”.
The GaladrielMap designed for use mainly with GaladrielCache but may be used with any tile OSM-like map sources or file tile cache for exploring the map.
The GaladrielMap created with use a lot of famous projects, so don’t forget to install dependenses.
The author is not responsible for the consequences of using the GaladrielMap as a navigator!

v. 1.3

screen

Features:

  1. View one OSM-like on-line map or
  2. with GaladrielCache the stacked maps
    Open Sea Map
    Open Topo Map
    or any number of other maps:
    stacked maps

  3. Positioning via gpsd and display current (writing now) track file in gpx format:
    Positioning

  4. Display routes and POIs files in gpx, kml and csv format:
    Display routes and POIs

  5. Creating a route localy and save it to the server in gpx format (description below):
    Creating a route

  6. Exchange coordinates via clipboard (see screenshot above and description below)

  7. Weather forecast from Thomas Krüger Weather Service (with GaladrielCache v.1.3 or above)
    Weather forecast

  8. Display AIS info:
    AIS info
    Displaying AIS data is disabled by default, so you must enable it by uncomment string with $aisServerURI variable in params.php.

  9. Control the GaladrielCache Loader:
    Control Loader

  10. Dashboard. dashboard.php - the separate app to display some instruments if it is in your board network, on weak (and/or old) devices, such as E-ink readers, for example. Displayed velocity, depth and true and magnetic heading. The Dashboard allows you to set a signal for dangerous events, such as shallow or speed. Set up your browser to allow sound signal.
    No javascript, no fanciful css.
    Dashboard velocity
    Dashboard heading

Compatibility

Linux. Modern browsers include mobile.

Install&configure:

You must have a web server under Linux with php support. Just copy app, dependences and set paths.
Paths and other are set and describe in params.php
Additionally, you may need to set parameters in files askGPSD.php and askAIS.php .

Dependences and thanks

Create a local copy of dependences and/or edit index.php

Emergency kit

All you need to install, including dependences, are in emergencykit/.

More thanks

gpsd

GaladrielMap gets realtime info, such as spatial data, AIS data, instruments from gpsd via askGPSD.php and askAIS.php services. You may configure these services to you gpsd host and port. Defaults are localhost and 2947 port (default for gpsd). In addition, you must specify the php cli filename on askAIS.php to start gpsdAISd.
How to install and configure gpsd see gpsd pages.

Tracks

You may use gpxlogger app from gpsd-clients packet to logging track on your server. GaladrielMap displaying current track as a not well-formed gpx file. Other tracks may be displayed simultaneously.
Run chkGPXfiles.php in cli to repair non-well-formed gpx files for other applications.

CSV

Comma-Separated Values text file - the simplest way of cooking personal POI for your trip. Only text editor needed. But, to avoid mistakes, any spreadsheet recommended.
The first line in the csv file must be field names. Good choice is a "number","name","description","type","link","latitude","longitude"
Latitude and longitude may be in degrees, minutes and seconds, 61°04.7’N for example, or in decimal degrees. A real example of using csv to store information about ports and piers on Lake Saimaa in Finland - SaimaaPOI. File with geospatial photolinks on csv format - is a good example too.

Exchange coordinates

To get current position to clipboard to share it via other apps - tap on Position on Dashboard tab.
Also, tap on POI name on point’s popup to get a position of this point.
To get coordinates of any point - open Handle route tab. Coordinates of crosshair will be in text field.
To fly map by coordinates type they of any format to this field and press button.

Create and edit route

Open Handle route tab to navigational plotting feature.
You can create and edit the route on the local device, and/or save it to server.
This feature includes a base gpx route editing tool. You can edit any gpx route from the server in the same way as local route, and save it under the same or new name.
Good case for use - navigational plotting by the navigator in a dry and warm booth for the steersman on the rain and wind.
But it is only a base gpx route editor. Gpx <metadata> not supported, and point <extensions> (GARMIN like it) not supported too. Be careful to edit and save exists gpx.

Support

You can get support for GaladrielMap and GaladrielCahe for a beer via PayPal at galadrielmap@gmail.com