I'm trying to make a map in Openlayers using an image of a crater from mars (specifically this image) so I can add markers/lines/etc on it.

I know the min/max latitude/longitude for this image, so how would i go about turning this into a map i can zoom/pan/add markers/etc to?

I've used MapTiler but the free version has watermarks, the coordinates seem to be off and it's got the earth as it's basemap:


In Openlayers 3 or 4, you can display an image as a base layer without depending on a WMS or a tile provider by using the ol.layer.Image constructor:

var imageLayer =  new ol.layer.Image({
            source: new ol.source.ImageStatic({
              url: 'https://astropedia.astrogeology.usgs.gov/download/Mars/MarsScienceLaboratory/Mosaics/thumbs/MSL_Gale_Orthophoto_Mosaic_10m_v3.jpg'

See this example from the Openlayers doc: http://openlayers.org/en/latest/examples/static-image.html?q=image


  • For this example you linked the extent is the resolution of the image, what do i do if i want the extent to be [137.094719, -5.249559, 137.853827, -4.068583] so i can put in markers using mars coordinates? eg. add a marker at (137.4416334989196,-4.589466952134487) – srysry Mar 7 '17 at 13:01
  • You can specify your custom extent & projection for that image. But do you want to overlay with the OSM base maps as shown in your image? – juminet Mar 7 '17 at 13:12
  • I don't, just this image. I got it work defining a custom extent, thanks a lot for your help! – srysry Mar 7 '17 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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