i want to add a geotiff image as base layer on openlayers :

  • copy my image.tiff in a directory and open it with openlayers directly without using a cartography server.

3 Answers 3


Unfortunately you cannot do this.

You can only display those images using OpenLayers which are spported by browsers. That is why using OpenLayers.Layer.Image you can only display JPEG, PNG & GIF images.

Other Image formats like Erdas Imagine, Tiff, GeoTiff ASCII etc need to be converted to a format which browsers understand, before they can be shown in the browser.


In fact you can turn the GeoTIFF files into an OpenLayers base map with the help of MapTiler software (http://www.maptiler.com/). Once the GeoTIFF file is processed with the software on your desktop - you get a directory with JPEG/PNG tiles together with a sample viewer made using OpenLayers.

Such a viewer and the folder with tiles can be uploaded to any web hosting - so there is no need to install any cartography server...

MapTiler either creates the Standard Mercator tiles - so your GeoTIFF can easily overlay Google Maps or OpenStreetMap, or it can keep the image in the original map coordinates.

If your file is a proper GeoTIFF with the geographical location and coordinate system definition embedded, then the software will load it automatically after you drag&drop it in - as in this video: https://www.youtube.com/watch?v=-rSYFwcWVnc&list=PLGHe6Moaz52PiQd1mO-S9QrCjqSn1v-ay&index=12

If you have a World file, but the coordinate system information is missing you can specify it easily: http://www.maptiler.com/how-to/coordinate-systems/

To turn an ordinary scanned maps without any location info into a map overlay see this video: http://www.maptiler.com/how-to/overlay-image-over-map/

  • It is quite nice, but is it possible to do this programmatically? How about converting hundreds of files at the same time?
    – F3L1X79
    Nov 17, 2016 at 14:01
  • 1
    Sure it is. See: maptiler.com/sdk and the manual for the command line usage: manual.maptiler.com
    – MapTiler
    Nov 17, 2016 at 15:01
  • In fact, we have in pre-release status a cluster version running on Amazon or Google cloud or on private clouds with Docker. This version is able to orchestrate a group of computers to render huge number of input files into a single seamless map (such as a detailed aerial photo of whole Texas or a stream of imagery from satellites - as done for our customers).
    – MapTiler
    Nov 17, 2016 at 15:04

You can use geotiff.js to load GeoTIFF from local storage or from URL. Example with OpenLayers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.