What this script is made for
This page generates Html- and Javascriptcode for simple OpenStreetMap slippymaps based on Openlayers. This script was not made for big projects with a lot of markers or other special things. Of course you can use it as basis. Suggestions for improvements are always appreciated.
Manual
The entry mask should be self-explanatory if you have already some little knowledge about creating a slippymap.
General procedure
- Set the titel, description, layer etc. and add markers if necessary.
- Click at "Create Preview" and open the link (in a new window so the entry mask doesn't get changed) to view the result.
- Repeat these two steps until you are satisfied with the result. If you are finished, you have to put it on your own webspace to make it publically available:
- Click on "Download map (only .html)" to download the map file (HTML) and save it somewhere on your computer. Download util.js and map.css and put them in the same folder as the HTML-file. You will also need openlayers.zip, which has to be extracted in the same folder, which will create a subfolder "openlayers".
- Or: Click on "Download map (all files in .zip)" to download the map file as well as the other required files. Extract the .zip-archive on your computer. The included openlayers.zip must also be extracted itself in the same folder, which will create a subfolder "openlayers".
- The file structure should look like this:
- openlayers
- img
- diverse Dateien
- theme
- diverse Unterordner und Dateien
- OpenLayers.js
- img
- map.css
- map.html
- util.js
- openlayers
- Upload all files (the one you downloaded seperately or those in the .zip) to your webserver or keep them on your local machine.
- Open the map.html in your browser to view the map.
Notes for some functions
- With the slippymap on the right you can choose the map view you want to have and "save the current map view" with the link. Also you can choose a point for the marker there (note that the map view will be bigger later because it depends on your browserwindow)
- Every button in the entry mask sends the whole entry mask, saves also the changes and shows them on the small slippymap on the right side (not all settings will be shown there). Some buttons will also start other actions (like "Create Preview" which will create a preview map)
- Additionally to the Html-file you need the following files in the same folder: util.js, map.css as well as the contents of openlayers.zip. If something doesn't work please update these files first. All required files should be contained in the .zip-file.
Important information
- The input is only passed by the entry mask and the PHP session but not saved anywhere. Thus if you close the website all input is gone. The script was only made for quick uncomplicated generation of a slippymap. However, you can export the current input to a JSON file and save it on your own computer, in order to be able to import it at a later time and continue working.
- The preview maps are deleted after a short timespane, thus they are not usable for linking. Please generate a map, download it and put it in your own webspace.
- The marker icons hosted on this site may or may not be available in the future. It is recommended to download the used image files from the addresses given in the map.html file, put in on your own webspace with the other map files and change the path accordingly.
Contact
If there is something that doesn't work or if you have suggestions, please send an email.