Map Tiles

Hi there

I setted up WebODM with a ODM processing node and processed a nice set of 750 pictures, wich worked smoothly :slight_smile:

In the preview in WebODM it displays my ortophoto on google maps, this is what I also need to do with my ortophoto in a different webapp. Therefore I would like to have the maptile file/script (which have to exist somewhere, otherwise WebODM could not display them), but in the standard download folder there is nothing like that. My question now is, where can I find these tiles?

Thanks in advance!

1 Like

Welcome! We are actually using the features of Cloud Optimized GeoTIFFs for display within WebODM. So, your GeoTIFF exports are exactly what we use.

If you need XYZ Tiles, or slippymap tiles, you need to process with the --tiles option enabled.

1 Like

Hey Saijin, Thank you for your reply. That was nearly what I needed. But I was able to find a solution:

  • process with --tiles
  • save the tiles folder in a S3 Bucket or similar
  • then with this script it is possible to display the tiles on Google Maps:
var mapBounds = new google.maps.LatLngBounds(
    new google.maps.LatLng(46.914590, 7.436939),
    new google.maps.LatLng(46.921580, 7.449883));
var mapMinZoom = 14;
var mapMaxZoom = 21;
var maptiler = new google.maps.ImageMapType({
    getTileUrl: function(coord, zoom) {
        var mapSize = Math.pow(2, zoom);
        var x = coord.x;
        var y = mapSize - coord.y - 1;
        var url = “BASE_URL_TO_YOUR_STORAGE” + zoom + “/” + x + “/” + y + “.png”;
        if ((mapMinZoom <= zoom) && (zoom <= mapMaxZoom))
            return url;
        else
            return “URL_TO_AN_EMPTY_PNG”;
    },
    tileSize: new google.maps.Size(256, 256),
    isPng: true,
    name: “odm_orthophoto.tif”,
    alt: “odm_orthophoto.tif”,
    opacity: 1.0
});
map.overlayMapTypes.insertAt(0, maptiler);
map.setMapTypeId(“roadmap”);
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.