I have an image which I want to make it zoomable and dragable in browser, and draw some overlays like lines and markers on it.

So I wonder if I can use the map api like Google map or openlayers to load the image. Then I can use the draw feature provided by the API to add overlays.

Since the image size is not fixed ,some of them are almost 100M. So I may have to generate tiles first, but the image have no coordinates, so I do not know if it is possible.

Any suggestions?

  • Are your images georeferenced? – Below the Radar Oct 20 '14 at 17:32
  • No,just a static image. – giser Oct 20 '14 at 21:37
  • I would try to convert your image to svg wich can me dragged easily in maps – Below the Radar Oct 21 '14 at 12:27

Yes, it is definitely possible.

QGis has a QTiles plugin, which uses gdal2tiles under the hood, AFAIK.

Then you can use leaflet/openlayers to read your tiles from the created directory structure.

  • But how about the coordinate of the tiles ? – giser Oct 20 '14 at 21:38
  • Just fake it. georeference the image so the corners get UTM coordinates, export with QTiles plugin. QTiles generates a leaflet-based viewer if instructed. You can use this as a base for further work. – til_b Oct 21 '14 at 7:18
  • I found this:developers.google.com/kml/articles/raster#translate. Seems gdal_translate can do this job. – giser Oct 21 '14 at 7:24
  • hummm what about the dragable part? How tiles could be dragged? svg wont be a better option? – Below the Radar Oct 21 '14 at 12:25
  • Just try it. Import a raster image to QGis, assign a projection/fake georeference, the use QTiles plugin to export. – til_b Oct 21 '14 at 12:45

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.