Klokan Technologies GmbH – MapTiler problem

So I purchased some software (MapTiler) from Klokan Technologies GmbH (Hofnerstrasse 96, Unterägeri 6314, Switzerland). It all worked great until I reinstalled my computer. Then their software stopped working. I asked them why and they said that I needed to release the license before reinstalling my computer. I asked to release the lincense now so that the software would work again. They said they can’t do that but what they can do is to offer me a lincense for their new version of the same software (new version which is the same software just with a different version number). Continuă lectura „Klokan Technologies GmbH – MapTiler problem”

Cheap noise-suppression headphones – DIY

Here is how I’ve made some simple but effective noise-suppression headphones.You need a pair of old headphones and a pair of hearing protection earmuffs. My earmuffs were really cheap, 4€, so this will be very cheap noise-suppression headphones. Continuă lectura „Cheap noise-suppression headphones – DIY”

Compare OSM and Google Maps

Why settle with only one online map provider when you can use them all. Sometimes OSM (OpenStreetMaps) offers better coverage in some places while Google Maps look really good plus you have Street View and Satellite View.

That’s why I decided to use a tool that will let you easily compare the maps and get all the available information. It looks something like Continuă lectura „Compare OSM and Google Maps”

Compute OpenStreetMaps tile numbers so that they wrap around

I use Google Maps API to display OSM tiles. Log story short, the code below helps you make this:

be displayed like this:

Notice how the one OSM tile that shows the whole map is replicated left and right forever. In this way the tiles will be shown the same way like Google tiles.

The code to initialize the Google Maps API with OSM tiles:

function init_osm() {
    map_osm = new google.maps.Map(map_div, {
    center: new google.maps.LatLng(pos.lat, pos.lng),
    zoom: pos.zoom,
    mapTypeId: "OSM",
    mapTypeControl: false,
    streetViewControl: false
  //Define OSM map type pointing at the OpenStreetMap tile server
  map_osm.mapTypes.set("OSM", new google.maps.ImageMapType({
    getTileUrl: function(coord, zoom) {
      var maxTile = Math.pow(2, zoom);
      if (coord.y < 0 || coord.y >= maxTile) { return;};
      var x = coord.x % maxTile;
      var y = coord.y % maxTile;
      x = x < 0 ? x + maxTile : x;
      y = y < 0 ? y + maxTile : y;
      return "http://tile.openstreetmap.org/" + zoom + "/" 
                + coord.x + "/" + coord.y + ".png";
    tileSize: new google.maps.Size(256, 256),
    name: "OpenStreetMap",
    maxZoom: 19

Bing Maps API v7 – unable to register/trigger „mousedown” event on map’s div

Instead of:

map.addEventListener("mousedown", handler_function, false);


map.addEventListener("mousedown", handler_function, true);

Notice the „true” value in the second line of code. That means that we get the event during the capture phase. It seems that Bing Maps get the event in the same phase and then kill it, so you will not receive the event if you wait for it in the bubbling phase (like in the first line of code).