WARNING: Couldn't set upload_max_filesize to 32M
WARNING: Couldn't set post_max_size to 64M
OMGM - Orienteering Maps in Google Map

Orienteering Maps in Google Map

When developing Google Map applications for showing orienteering courses or GPS tracks from orienteering events, the experience would be much better if you had orienteering maps in Google Map...

And now OMGM have come to rescue! OMGM allows you to upload orienteering maps and use them in your Google Map application. OMGM provide a "orienteering map tile layer" for all uploaded maps.

How to use OMGM?

Include following JavaScript code in your Google Map application to enable it to use OMGM.

  var map = new GMap2(document.getElementById("map_canvas"));
  ...

  var omgmCopyright = new GCopyrightCollection('OMGM (C)');

  var omgmBounds = new GLatLngBounds(new GLatLng(-90,-180), new GLatLng(90,180));
  omgmCopyright.addCopyright(new GCopyright('OMGM', omgmBounds, 8, 'Various map producers'));
  
  var omgmTilelayer = new GTileLayer(omgmCopyright, 8, 16);
  omgmTilelayer.getTileUrl = function(point, zoom) {
      var url = 'http://ifk.kiruna.se/omgm/tile.php?x='+point.x+'&y='+point.y+'&zoom='+zoom;
      return url;
  };
  omgmTilelayer.isPng = function() { return true; };
  omgmTilelayer.getOpacity = function() { return 1.0; }
  
  // Orienteering maps over normal map
  var omgmTileLayersNormal = [G_NORMAL_MAP.getTileLayers()[0], omgmTilelayer];
  // Orienteering maps over satellite map
  var omgmTileLayersSat = [G_SATELLITE_MAP.getTileLayers()[0], omgmTilelayer];
  var omgmMapNormal = new GMapType(omgmTileLayersNormal, new GMercatorProjection(20), "O Maps over normal map", {errorMessage: "No data available"});
  var omgmMapSat = new GMapType(omgmTileLayersSat, new GMercatorProjection(20), "O Maps over satellite map", {errorMessage: "No data available"});
  map.addControl(new GMapTypeControl());
  map.addMapType(omgmMapNormal);
  map.addMapType(omgmMapSat);
  // Now you should see new Map Type controls (with names "O Maps over normal map" and "O Maps over satellite map" besides the ordinary Map Type controls)
 
  // If you always want orienteering maps on Google Map. Then you skip map.addMapType(omgmMapNormal); map.addMapType(omgmMapSat); above and add following
  //var omgmTileOverlay = new GTileLayerOverlay(omgmTilelayer);
  //map.addOverlay(omgmTileOverlay);

  ...

Copyright

Maps are often protected by copyright, respect this and don't upload anything without approval.