In theory, this should run on a Windows system as well.
It does not require anything specific to Linux (Perhaps with the exception of the cron task).
There is no reason that part could not be adapted to run from a Windows scheduled task though.
PHP is PHP after all.
Without a map tile server or static tiles, Mesh users without internet access on their systems may not see any map tiles.
On the mesh, you cannot expect the client to have internet access in order to retrieve the tiles, you must provide them yourself, one way or another.
The main map webpage will try to check for internet access and load the appropriate maps.
Default internet map tile servers have been provided in the ini file, but the ini file will need tweaking if you want to use “local” tile servers or directories.
It is way beyond the scope of this README file to help in setting up a map tile server.
You are unfortunatly on your own there.
It is a time consuming and computationaly expensive process, but can be done on “normal” hardware.
It also takes 100’s of GB of HD space if you want to map the entire world, and that does not include the tiles themselves, that is only for the data required to create the map tiles.
A good place to start for more info is: https://switch2osm.org/serving-tiles/
If you attempt it, be patient, you will get it wrong more than a few times but in the end you might be surprised. :)
Tip: Another option is that some programs, Xastir in particular, will save the map tiles they use.
You *can* use those tiles as well, but they must be made to be accessible by your webserver.
You might be able to convince KG6WXC to create local map tiles for you, if the area you want is in the USA, he does not have the available SSD space for the entire world… yet.
If you do ask, be prepared, it literally takes KG6WXC’s system about 3-4 days just to render the tiles for a smallish area and it’s kind of a PITA!
As an example, KG6WXC once made tiles for the Mesa Az. mesh group.
It was a smallish area around Phoenix Az, out to a zoom of about 8 or something.
It ended up at around 3GB of map tiles and took about 4 days of total run time to render on the server...
and it had to restart a few times too, due to running out of 8GB of RAM and having to tweak a few things along the way...
It actually took much longer than the 4 days of actual run time.
Building/Using a map tile server is not for the faint of heart!
(Should work for other Linuxes as well, change where needed)
1: Clone the projects directory from the git repository and enter it
git clone https://mapping.kg6wxc.net/git/meshmap ; cd meshmap
2: Import the SQL file to create the database
sudo mysql < node_map.sql
3: Create a user for the database, you might have to login to the mysql server as root.
Here is an example of creating a mySQL user and granting access to the node_map database:
CREATE USER 'mesh-map'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT, DELETE, DROP, INSERT, TRIGGER, UPDATE on node_map.* TO 'mesh-map'@'localhost';
4: Copy scripts/user-settings.ini-default to /scripts/user-settings.ini and edit the user-settings.ini file
The way the user editable files are distrubuted has changed!.
Tip: if you get a “command not found” error, you may need to run it like this:These are options you can send to get-map-info.php:
Output to console only, do not read/write to the database.
This will make sure the scripts can reach your localnode and the rest of the network.
This will not update the database, you won’t see anything on the map page yet, it only outputs to the terminal for testing.
Output to console and read/write to the database.
This will ensure everything is setup correctly and get some data into your database!Tip: Do not ctrl-C out of the script while it is using the database!
Let it finish, even if it seems hung up.
You should recieve some error if something is actually wrong.
Using ctrl-C to stop the script midway will cause problems in the database, do not do it!
If the --test-mode-no-sql is successful, you can go ahead and run the script with --test-mode-with-sql or just without any options.
Run the script without options and there is no on screen output (this is for cron).
5: Copy http-meshmap.conf-default to the apache2 “Conf Available” directory,
Rename the file as httpd-meshmap.conf (or whatever you want to call it really.)
Once the file is copied, you need to edit it and make sure the
<Directory> directives have the correct paths.
After you have made sure the file is correct then run:
sudo a2enconf httpd-meshmap
This is will load the config into Apache and if successful, it will tell you to reload apache, do so.
Other linux distibutions may require you to copy this file into /etc/httpd/extra
and then edit /etc/httpd/httpd.conf and add the line:
6: Load up the page: http://myhostname/meshmap/index.php and you should hopefully see your data.
You may or may not see any map tiles, depending on if the system you are using to view the page has access to the internet or not.
Even without map tiles, you should still see your data being mapped out.
7: The cronscript.sh file is to automatically run the polling script and can be run from cron every minute.
(or at whatever interval you choose)
Copy the cronscript.sh-default to where ever you like and rename it to just cronscript.sh (or whatever you want).
Then, you must edit the cronscript.sh file and make sure the path it uses to get to the scripts directory is correct!
After that, create a cron entry with
A cron entry is as easy as this:
* * * * * /home/pi/cronscript.sh
You can safely run the script every minute in cron like this.
It won’t actually do anything unless the intervals specified in the ini file have expired.
Simply run a “git pull” from the meshmap directory and the scripts will be updated from the git repo.
The user-settings.inc, meshmap-settings.ini, cronscript.sh, and custom.inc files will not be affected by updating.
The settings in the default ini files may still change and have things added or removed in future versions.
For now tho, if the default ini files change, and you still have the old ones in use, things will probably break! Be Warned!
Hopefully in the future this process can be more automated.
If you make changes beyond the user editable files I encourage you to perhaps push the changes upstream, please contact email@example.com if you wish to do so.
I am making changes all the time, it would be a good idea to run “git pull” from time to time to find any updates.
http://(hostname)/meshmap/node_report.php will show you all the info in the DB without trying to map anything.
This can be useful to see if all the data is there or to find nodes that have no location set. (or other issues)
There is an “admin” page, which is still in the works, what is there now does work tho.
Try to load up: http://(hostname)/meshmap/admin/admin.php in your web browser.
I’ve tried to provide instructions on the admin pages themselves.
From the admin pages you can “fix” a nodes location, which can be helpful for those users that forget the “-” in front of their longitude. :)
The admin pages also allow for the addition of “Non Mesh” Markers, fire stations, police stations, EOC’s , etc…
(In no particular order)
- [x] Add new MeshMap Logo.
- [x] Change the user editable files to be distributed with “-default” added to the extension, no more tar.gz file.
- [ ] Use a cookie instead of _POST for the internet check (No more stupid dialog box on refresh).
- [ ] Make “Parallel Threads” work again in get-map-info script, with limits on how many can be run at once (this will greatly speed up network polling).
- [ ] Changes so sbarc.org can have the new version too!
- [ ] Change css file for the “?” slide-out menu.
- [x] Fix a typo in the attribution bar so the pop-up for the links is only for the links number.
- [ ] Implement N2MH’s “Link aging” idea(s).
- [ ] The “Planning” Tab.
- [ ] Make it so other networks can export their data for use on a “Mega Map” type page. :)
Contribution is encouraged!!
I can’t think of everything!
If you find an improvement, typo, or whatever, please, send an email to firstname.lastname@example.org and we can get you setup with write access if you’d like!
This README file last updated: May 2018