OpenStreetMap logo OpenStreetMap

Candid Dauth's Diary

Recent diary entries

Revival of Openptmap

Posted by Candid Dauth on 1 June 2024 in English.

I really missed Openptmap ever since the service stopped working a few years ago. It was an important feature of FacilMap that I had used frequently in my daily life. This is why I have decided to invest in a bigger server to be able to render and host the tiles myself.

I have set up a tile server with the original Openptmap styles on https://pt.facilmap.org/. You can browse the tiles through FacilMap.

For now, tiles are generated when first requested, so rendering the map will be very slow when a region is first accessed. Also, there are no automatic updates of the map yet, so for now the state of the map will be frozen in time. When I find the time, I want to bring the setup up to date to enable automatic updates. If you have the skills and want to contribute, what would be needed would be to rewrite the filter and style into an osm2pgsql flex output Lua script.

If you find this service useful, a financial contribution would be greatly appreciated.

FacilMap 3 has been released

Posted by Candid Dauth on 10 April 2021 in English.

FacilMap 3 is a complete rewrite of FacilMap, with a focus on an improved, more stable and smartphone-friendly UI.

FacilMap is a privacy-friendly, open-source versatile online map that combines different services based on OpenStreetMap and makes it easy to find places, plan routes and create custom maps full of markers, lines and routes. Features include:

  • Different map styles for roads, topography, cycling, hiking, public transportation, water navigation, …
  • Search for places and show their information (website, opening hours, …)
  • Calculate routes and adjust them by dragging. An elevation profile can be shown.
  • Smartphone-friendly interface.
  • Create and share custom maps with markers, lines and routes on them.
  • Open GPX/KML/OSM/GeoJSON files and save them on a custom map.
  • Define custom styles of markers, lines and routes and generate a legend automatically.
  • Define custom form fields for the details of markers, lines and routes.
  • API to embed custom maps into a website and to modify them programmatically.
  • Extensive documentation.

FacilMap 2 has been released

Posted by Candid Dauth on 20 October 2016 in English.

A new version of FacilMap has been released.

Everything has been rewritten from scratch. FacilMap is now based on Leaflet, AngularJS and Bootstrap.

FacilMap is an online map that aims to bring together many useful functions in a usable and pretty way onto an open-source map based on OpenStreetMap.

  • Different map styles: OpenMapSurfer, Mapnik, OpenCycleMap, Hike & Bike map, Public Transportation map, Hillshading overlay
  • Find places and calculate routes. Routes are fully draggable.
  • Show GPX/KML/OSM/GeoJSON files on the map (use Tools → Import File, type a URL into the search field, or simply drag and drop a file onto the map)
  • Show additional information about places (for example opening hours or a link to the website). Press the map for 1 second somewhere to show information about what is there. (Uses Nominatim.)
  • Zoom to the location of your device and follow it.
  • New: Create custom collaborative maps on https://facilmap.org/myMapName. Markers, lines, routes and even GPX/KML/OSM/GeoJSON files can be added to these maps by everyone who has the link to the editable version of the map (every map has a read-only and a read-write URL), and changes are displayed live to everyone who is looking at the map at the same time. Advanced features include the definition of custom marker/line types with custom form fields and styles and the automatic generation of a map key.
  • Can be easily run on your server or embedded into your website (see below).

I have finally had the time to build in a timeout for OSM Route Manager and History Viewer.

Previously, the only limit was the memory of the Java process, which caused some requests to take really really long. The queue got very long and the service became unusable. (And before that, there hadn’t even been a memory limit, the service would just dump cached items from the memory and re-fetch them from the API when needed.)

Now, I have set the timeout to 10 minutes. I know that this might not be enough for the “Relation blame” of medium to big relations, but at least it keeps the service usable.

OSM Route Manager and History Viewer

Posted by Candid Dauth on 4 February 2011 in English.

Since the introduction of the queue in Route Manager and History Viewer, there have been several down-times where the queue became very very long without anything being processed. The reason why nothing was processed was that someone tried to use the “Relation Blame” on very big relations, such as http://www.openstreetmap.org/browse/relation/107796. I have therefore disabled the Relation Blame function for now.

The reason why the queue got so long (sometimes several thousand requests) is probably caused by bots. Probably beacuse of the links that the Wiki automatically creates to the two tools. I suppose I will have to add a robots.txt, and if that does not help, a Captcha.

OpenLinkMap layer in FacilMap

Posted by Candid Dauth on 4 January 2011 in English.

With FacilMap (facilmap.org, Wiki), I try to create a map that has all the features of Google Maps but uses OpenStreetMap layers.

For a long time, I’ve wanted to implement something similar to the relatively new Google Maps feature where you can click on POIs (such as companies or restaurants) and a popup displaying details opens.

Now I’ve come accross OpenLinkMap (olm.openstreetmap.de, Wiki), which seems to do exactly this. So I’ve created an OpenLayers layer for it and added it to the Beta version of FacilMap available on beta.facilmap.org. On zoom levels >= 13, you’ll see these transparent dark-blue circles around some POIs. Click on them and a popup appears with some information about the POI.

At the moment, OpenLinkMap seems to only contain POIs that have either a telephone number, a website or a Wikipedia article. Hopefully, in the future other POIs will be included as well so that one can see their address and opening hours.

If you want to include the OpenLinkMap layer into your OpenLayers map, include the FacilMap API JavaScript into your website:
<script type="text/javascript" src="http://beta.facilmap.org/api/facilmap.js"></script>
(Once the OpenLinkMap layer is considered stable, it will be added to the stable FacilMap API on http://api.facilmap.org/facilmap.js.)

Then add the layer to your map using the following code:
map.addLayer(new FacilMap.Layer.Markers.OpenLinkMap("OpenLinkMap"));

This feature is documented on http://wiki.openstreetmap.org/wiki/FacilMap/API/POIs.

Route Manager and History Viewer

Posted by Candid Dauth on 30 December 2010 in English. Last updated on 1 January 2011.

OSM Route Manager and History Viewer are now hosted on the FOSSGIS development server under the new URLs http://osmrm.openstreetmap.de/ and http://osmhv.openstreetmap.de/. I will continue to use the old URL (http://osm.cdauth.eu/route-manager/ and http://osm.cdauth.eu/history-viewer/ ), which now redirect to the new locations.

I have implemented some new caching and queueing mechanism so that only one request is processed at each time (to avoid a too extensive use of resources and API calls). Hopefully, the service will finally run acceptably stably due to these changes.

Route Manager and History Viewer

Posted by Candid Dauth on 15 December 2010 in English.

Dominik Mahrer (http://www.teddy.ch/) has offered me to host OSM Route Manager and History Viewer, as I was experiencing a lack of resources that forced me to take them offline. Many thanks to him!

The tools are available on the old URLs (http://osm.cdauth.eu/route-manager/ and http://osm.cdauth.eu/history-viewer/‌ ). Some things don’t work quite right yet (such as the nasty Google Maps API key warning appearing all the time), but at least the tools are usable again.

I am currently working on improving the speed a little bit by using better caching, hopefully it will be as usable as it used to be some day again.

Rename of cdauth’s map to FacilMap

Posted by Candid Dauth on 30 November 2010 in English.

cdauth’s map and its API are now called FacilMap and is available on http://facilmap.org/. I will try to keep all old URLs alive. People who want to make use of new features have to migrate their code following the guide on http://wiki.openstreetmap.org/wiki/FacilMap/API/Migration_guide_from_cdauth%E2%80%99s_map.

The OpenStreetBugs layer is now hosted on http://api.facilmap.org/osblayer/ instead of http://osm.cdauth.eu/openstreetbugs/.

ajax-proxy now runs on http://api.facilmap.org/ajax-proxy/ instead of http://osm.cdauth.eu/ajax-proxy/.

The new OpenStreetBugs JavaScript client (http://wiki.openstreetmap.org/wiki/OpenStreetBugs/New_Client) is now being developed in a repository independent from cdauth’s map. The reason for this is that I can manage committers separately. I am planning to put the translations into TranslateWiki and hope to get automatic updates into the Git repository.

Everyone using the JavaScript library from http://osm.cdauth.de/map/openstreetbugs.js or http://osm.cdauth.eu/map/openstreetbugs.js should from now on use the new location http://osm.cdauth.eu/openstreetbugs/openstreetbugs.js.

The old locations will redirect to the new one for some time.

The source code is now developed on http://gitorious.org/cdauths-map/openstreetbugs.

OSM Route Manager and History Viewer have been down for about three months now. As I have written earlier, the reason for me to disable them was thir massive memory consumption. I have just put them online again, although they don’t work well yet.

Originally, Route Manager was entirely written in PHP. As splitting large relations into segments is a CPU-intensive operation, I rewrote the logic in Java but kept the PHP web pages. The PHP page would start the Route Manager Java executable for each request and after its completion read out the result from an SQLite database. I adapted the same concept for OSM History Viewer.

The problem with this approach was the massive memory consumption that had two reasons:
1. There was no limit on concurrent requests, so 10 concurrent route analysations would have caused 10 Java Virtual Machines to run, and each of them takes a lot of memory by itself.
2. To analyse a large relation or changeset, all of its members had to be loaded into memory.

I solved these problems more or less in the following way:
1. I rewrote the PHP pages in JSP so that both applications and all simultaneous requests would run in one JVM.
2. If too many objects are in the memory, some of them are dumped into a Postgres database (which increases the CPU usage and thus the analysation time).

The server I run the two applications on has 512 MB RAM and a very slow SAN hard disk connection (with 1–2 MB/s), so swapping is very slow. With the old PHP versions of the applications, my server would completely hang up when too many JVMs were running because of the lot of swapping to do. This was unacceptable because I also use the server for e-mails. With the new JSP versions, the memory usage of the applications is limited. I have not yet found a way to find out the actual memory consumption of a process under Linux, but the VIRT column currently shows 368 MB and the RES column 186 MB for the servlet container, so the actual usage must be somewhere in between.

This is still high memory usage, but at least it prevents my server from hanging up completely. Unfortunately, due to the excessive usage of the Postgres database to minimise the memory usage, everything takes very very long. Somewhere, there seems to be a limit of 5 minutes after which the web pages stop loading, although the servlet container in the background still keeps calculating. So at the moment, you still cannot analyse large relations or changesets. I am planning to create some asynchronous user interface where you are notified via e-mail or similar once the analysation is complete.

If you have a server running a servlet container and have some resources left where you want to host the two applications, that would make things a lot easier for me. Please contact me in that case.

The routing support of cdauth’s map, my OpenLayers map with additional features (routing beta preview on http://osm.cdauth.eu/map-routing/), has made some progress. I have switched the routing provider from YOURS to CloudMade, which is almost comparable to Google Maps in speed (the only problem seems to be that it cannot route over ferries yet).

I have fixed some bugs considering the drag and drop support. You can move the start and destination markers on the map as well as drag parts of the route to change its course (creating “via” points, remove them again by double-clicking them).

I have tested in the newest versions of Firefox, Opera and Konqueror. Some bugs are yet to be fixed:
* Removing “via” points by double-click does not work in Konqueror
* Very rarely, strange things happen after dragging “via” points: hundreds of JavaScript errors appear or the map itself is not draggable anymore.
* The different versions of Internet Explorer need to be tested (I suspect that it works in none of them properly.)
* Test in Opera 10.0.

As some of you might have noticed, Route Manager and History Viewer have been down for a while. I had to take them down because with the current implementation -- a PHP page starting a new Java Virtual Machine on each request -- my server would hang up at too many concurrent requests because of too little memory, which is unacceptable because I am expecting some very important mails on that server. I am on a journey right now with very limited Internet access and unfortunately did not quite manage to finish the new version, completely Java-based, before leaving home. I will be back not earlier than beginning or middle of July. Maybe someone manages to run the applications on their server until then? Sorry for the inconvenience and greetings from Greece, Candid

Routing in cdauth’s map

Posted by Candid Dauth on 15 March 2010 in English.

I have added experimental routing support to my map. I am using the YOURS API to calculate the routes and try to provide an easy user interface that is similar to Google’s. You can drag and drop the route start and end point and also drag parts of the route to create Via points. It works pretty well (only tested on Firefox so far), but a few bugs still occurr some time.

You can try it out on http://osm.cdauth.de/map-routing/. Please be aware that this is a temporary URL, normally you can access my map on http://osm.cdauth.de/map/.

If you want to try this in your own map, include the JavaScript file http://osm.cdauth.de/map-routing/prototypes.js (remember: this is a temporary URL) and use the following code:

var layerRouting = new OpenLayers.Layer.cdauth.XML.Routing("Routing");
map.addLayer(layerRouting);
layerRouting.setType(OpenLayers.Layer.cdauth.XML.Routing.Type.FASTEST);
layerRouting.setMedium(OpenLayers.Layer.cdauth.XML.Routing.Medium.CAR);
layerRouting.setFrom(new OpenLayers.LonLat(5.963946, 52.215676));
layerRouting.setTo(new OpenLayers.LonLat(6.1799, 52.2573));

The drag’n’drop will work automatically.

Live Permalinks

Posted by Candid Dauth on 24 November 2009 in English.

I have simplified the syntax to add Live Permalinks to an OpenLayers map with my cdauth’s map API. These Permalinks are stored in the part after the # in your browser’s address bar, so when you reload the page, everything will be exactly the same and you can easily send the link to your friends. You can then also use your browser history, so when you hit the “Back” button in your browser, the previous map view will be loaded. Try it out on http://osm.cdauth.de/map/.

To add the functionality to your map, include http://osm.cdauth.de/map/prototypes.js into your web page and replace the constructor “OpenLayers.Map” with “OpenLayers.Map.cdauth”. Then add an OpenLayers.Control.cdauth.URLHashHandler object to your map either by putting it into your controls array or by using the following code:
var hashHandler = OpenLayers.Control.cdauth.URLHashHandler();
map.addControl(hashHandler);
hashHandler.activate();

This will keep the location hash part in sync with the current map view, so the location will be updated when the map view is changed and the map view is updated when the user changes the location hash part manually (or opens a Permalink someone sent him).

Read more about my API on http://wiki.openstreetmap.org/wiki/Cdauth’s_map/API.

There is a new OpenStreetBugs JavaScript client that makes it possible to easily include OpenStreetBugs into an OpenLayers map. See the announcement on http://lists.openstreetmap.org/pipermail/talk/2009-November/044206.html and the Wiki page on http://wiki.openstreetmap.org/wiki/OpenStreetBugs/New_Client.

There are 16 labels to be translated, currently an English and a German translation are available. If you have some time left over, help translating it on http://wiki.openstreetmap.org/wiki/OpenStreetBugs/New_Client/Translation.

Back from holidays

Posted by Candid Dauth on 2 October 2009 in English.

Just wanted to say that I’ve been back from my journey through Italy for one week now.

OSM Route Manager and OSM History Viewer are working again, they had problems due to a full server disk. Furthermore, the server was down for about two weeks in August.

The cdauth’s map layers are working again, many of them had been broken due to OpenLayers API changes.

During the next weeks, I will upload the GPS traces of my journey (and probably create lots of highway=road as well as camping sites and supermarkets) and continue the work on OSM History Viewer and the new OpenStreetBugs client.

Unfortunately, mapping is kind of hard for me at the moment, as both the displays of my camera and my GPS device don’t work anymore (the latter is actually “broken”…). Fortunately though, I’ve got to know some mappers in my area (as well as have gotten mappers some people I know), so maybe some of us will do one or another tiny mapping party some day.