Zum Hauptinhalt gehen

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

Google Map Lat/Long url in web-gallery template

Kommentare

2 Kommentare

  • rgstokstad
    Here's a solution for making a link to Google Maps for a geo-tagged image in a Media Pro gallery. It's a hack, implemented using the terminal and command line in Mac OS X, but it does the job.

    Insert the following line at some appropriate place in the media.html template.

    <a href="http://maps.google.com/?hl=en&q=loc:(iView:Latitude),(iView:Longitude)"target="_blank" >Google Map </a>

    ----

    After running Make HTML Gallery, this produces the following line of code in a .html file located in the source folder of the resulting gallery.

    <a href="http://maps.google.com/?hl=en&q=loc:N 036° 43' 21.56",W 121° 16' 45.14""target="_blank" >Google Map </a>

    (This line will not work in a browser because of the quotes - the symbol for seconds of arc - on the values for Lat and Long.)

    ------

    This can be repaired by running the following unix shell script to remove the offending quotes from all of the .html files in the source folder.

    for i in *.html; do sed -e 's/",W/, W/g' -e 's/""/"/g' <$i > $i.temp; done;for file in *.temp ; do mv $file `echo $file | sed 's/.temp//'` ; done

    ----

    This script, operating on the above line of html code, produces

    <a href="http://maps.google.com/?hl=en&q=loc:N 036° 43' 21.56, W 121° 16' 45.14"target="_blank" >Google Map </a>

    ------

    Google maps understands this link and produces the desired map.

    As an example this solution has been implemented in producing the following gallery.



    Note, I was unable to find a solution that could be implemented in the media.html template. Indeed, I believe such a template-based solution does not exist because of the presence of both ' and '' in the i-View values for Lat and Long.

    The lesson: If the Lat and Long values in Media Pro were changed to decimal form, this hack would be unnecessary.

    Cheers,
    Bob Stokstad
    0
  • Sylvain M.
    Thank you for sharing this alternative.
    But it would be so nice to do this without scripting ... (especially since I'm on PC, and that I can adapt this code).
    Moreover, the problem is not just the web galleries, but also to export metadata to a text file. DMS to DD conversion, to use GPS data in external software, is always more complex than if it was directly in DD.
    I hope the Media Pro team hear this call!
    Sylvain M.
    0

Post ist für Kommentare geschlossen.