"Franz Buchinger" [email protected] wrote on 16/08/2011 at 21:17:11 +1100 subject "[OpenLayers-Users] Display geotagged photos in OpenLayers" :
Thank you very much for your reply! > first of all, you probably want to generate thumbnails of your photos and > load these into the map instead of the large-size images you are using now. > This gives you a much better performance. Yes, this is very easy to do. Shrink the jpg instead of setting only the pixel dimensions. > The popup can then contain a link > to the full-res version of the photo. How can the pop up size be defined? > Extracting EXIF/GPS metadata from JPEG images in Javascript is possible, but > quite hacky and out of OpenLayers' scope. There is a Javascript library of > Jacob Seidelin that does that ( > http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html), > but it comes with the downside that you have to download all hi-res versions > of the photos to the browser in order to get the gps coordinates contained > in the exif metadata. > A better approach would be to dump out the GPS coordinates of the photos > into a JSON file, and load that file into OpenLayers with an AJAX request. > You can then specify an Openlayers.Format that parses this information and > creates a feature for each of your photo. As I am not a web designer, and I am not familiar enough with JavaScript, JSON and AJAX this is not easy to achieve for me... > You can use the exiftool command line utility ( > http://www.sno.phy.queensu.ca/~phil/exiftool/) to quickly dump out all GPS > coordinates into a JSON structure, see the reading examples page ( > http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#reading_examples) > for more information. Thank you for this tool! extracting lat/lon is easy with it and I will be able to create the text file for use with the var Photos = new OpenLayers.Layer.Text("Photos",{location:"data/photos.txt", projection: epsg4326}); map.addLayer(Photos); code. My remaining problem is to enlarge the pop up size big enough to fit the photo in it. An "X" to close the pop up would be handy too. -- Sincerely Hendrik Oesterlin - email [email protected] _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
