Candid Dauth's diary

Recent diary entries

FacilMap 3 has been released

Posted by Candid Dauth on 10 April 2021 in English (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 (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 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).

OSM History Viewer working again

Posted by Candid Dauth on 4 March 2013 in English (English).

There have been some API changes in OSM some months ago, which caused OSM History Viewer to fail with NumberFormatExceptions on all changesets where something was deleted. This basically meant that History Viewer had been unusable for several months now. The issue is now fixed.

OSM Route Manager and History Viewer

Posted by Candid Dauth on 19 May 2011 in English (English).

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 (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 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 (English).

With FacilMap (, 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 (, 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 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=""></script>
(Once the OpenLinkMap layer is considered stable, it will be added to the stable FacilMap API on

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

This feature is documented on

Route Manager and History Viewer

Posted by Candid Dauth on 30 December 2010 in English (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 and I will continue to use the old URL ( and ), 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 (English).

Dominik Mahrer ( 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 ( and‌ ). 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 (English).

cdauth’s map and its API are now called FacilMap and is available on 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

The OpenStreetBugs layer is now hosted on instead of

ajax-proxy now runs on instead of

OpenStreetBugs library under new location

Posted by Candid Dauth on 28 October 2010 in English (English).

The new OpenStreetBugs JavaScript 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 or should from now on use the new location

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

The source code is now developed on

OSM Route Manager and History Viewer

Posted by Candid Dauth on 30 July 2010 in English (English).

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.

cdauth’s map beta with CloudMade routing

Posted by Candid Dauth on 30 July 2010 in English (English).

The routing support of cdauth’s map, my OpenLayers map with additional features (routing beta preview on, 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.

OSM Route Manager and History Viewer

Posted by Candid Dauth on 6 June 2010 in English (English).

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

Cross-domain XMLHttpRequest

Posted by Candid Dauth on 5 April 2010 in English (English).

I was a bit upset about the fact that everytime you wanted to write an AJAX application using the OSM API or the Namefinder, you had to set up a local proxy on your server because of the Same Origin Policy.

Thus I have written an AJAX proxy that circumvents the Same Origin Policy by using HTML

Routing in cdauth’s map

Posted by Candid Dauth on 15 March 2010 in English (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 Please be aware that this is a temporary URL, normally you can access my map on

If you want to try this in your own map, include the JavaScript file (remember: this is a temporary URL) and use the following code:

var layerRouting = new OpenLayers.Layer.cdauth.XML.Routing("Routing");
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.

Nominatim search result icons

Posted by Candid Dauth on 6 December 2009 in English (English).

Nominatim has a nice feature to provide an icon URL for search results, for example a shop icon if you search for supermarkets. I use these icons now for the search result markers on my map ( Although I don’t know if I will not restore the old marker icons, because these new icons aren’t very prominent on the map.

Live Permalinks

Posted by Candid Dauth on 24 November 2009 in English (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

To add the functionality to your map, include 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();

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’s_map/API.

New OpenStreetBugs client, translators needed

Posted by Candid Dauth on 17 November 2009 in English (English).

There is a new OpenStreetBugs JavaScript client that makes it possible to easily include OpenStreetBugs into an OpenLayers map. See the announcement on and the Wiki page on

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

Back from holidays

Posted by Candid Dauth on 2 October 2009 in English (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.

OSM History Viewer

Posted by Candid Dauth on 12 June 2009 in English (English).

The first part of OSM History Viewer, the changeset visualisation tool, is ready for testing on (I haven’t tested it much yet, so it could be really buggy).

During the analysis of the changeset, all ways that were changed are split into segments (connections of two nodes). Then the versions before and after the changeset are checked if they contain the segment. Segments that only exist in the old version are marked red, those that only exist in the new version are marked green, segments that exist in both versions (and thus were not changed) are marked blue. This way, you can see what exactly has changed, if someone only combined or split a way, this will not be marked as a changed (instead, it will be coloured blue).

One problem I am facing right now is that a single node movement can cause a way to change without the way being mentioned in the changeset. There is no way in the current API to find out which ways a node belonged to at a specified point in time. I can only guess this at the moment, maybe I will parse the history view on the OSM homepage in the future, as the way membership seems to be listed there.

A tag change visualisation will also be part of the changeset visualisation in the future, visualising which tags have been added, removed or changed on which way or node.

The second feature coming with OSM History Viewer will be a relation history analysis tool. It will be possible to show the changes on a relation (with all its members and sub-members) in a specified changeset as well as displaying who added which part to the current version of the relation (“blame” view).

In reply to davidearl, who suggested to use the planet diff files instead of the OSM API in my last diary entry about this: As the hard disk space on my web server is very limited, I would not be able to keep many versions of the diff files. A want the changeset visualisation tool to work with all changesets, no matter how long ago they were commited, and that is only possible by using the API.