Topic: Add a Google Map image in caption to show GPS image position

Hi,

Mainly of my photos have their GPS positions in EXIF. I would like to add a  Google map image in caption to show where the photo was taken.
It seems that <img> is only supported in Pro version, but before to purchase this version I would like to know if it's possible in free version or to be sure it will work on pro version.
In fact the xml will look like:

<image imageURL="images/wide.jpg" thumbURL="thumbs/wide.jpg" linkURL="" linkTarget="" >
    <caption><img src="http://maps.google.com/maps/api/staticmap?center=45.4736,5.973&zoom=14&size=256x256&maptype=roadmap&markers=color:blue|label:S|45.4736,5.973&sensor=false"  /></caption>   
</image>

Any possibility to do that in free version ? Does it work in pro version ?

I have my own perl script to generate xml files and to extract GPS data from EXIF.
For the first version, this is a static map, because this is easy, but probably in the future I would like to do with a dynamic map, it will be  done with javascript.
Do you have exemples of this kind of integration (simpleviewer + Google Map) ?
Thanks in advance for your help
Regards
Nicolas

Re: Add a Google Map image in caption to show GPS image position

You can use an image in a caption in both the Standard and Pro versions.
You should enclose the contents of your caption in a CDATA tag like this:

<caption><![CDATA[<img src="http://maps.google.com/maps/api/staticmap?center=45.4736,5.973&zoom=14&size=256x256&maptype=roadmap&markers=color:blue|label:S|45.4736,5.973&sensor=false" />]]></caption>

Howeve, the image will be displayed only when the gallery is uploaded to a web server.

The Pro version will give you much greater control over the placement of the caption (with access to the Fixed Layout options, for example).

Steven Speirs
SimpleViewer Support Team.

Re: Add a Google Map image in caption to show GPS image position

Thanks it works !
I tested in local, not on the server, that's why it did not work...

If other users have gallery with Google Map integration, I'm really interested to see the result.
Thanks in advance
Regards
Nicolas

Re: Add a Google Map image in caption to show GPS image position

Hi,

I have a new question.
In fact the image included in caption is about 250px/250px.
The thumbs and captions are displayed on the left of the photo.
But if I would like to have 3 rows of tumbs, then the image in the caption is cut on bottom side.

Is it possible to define the maximum size of the caption section, then simpleviewer will define the size of all sections to fit on the screen  ?
Or to have the thumbs on the top/left corner and not near the midle ? If I set only 2 rows, the image in caption is still cut since the thumbs start in the middle of the screen.
I guess all this are possible in Pro version , but what about the free version ?

Thanks in advance !
Regards

Nicolas

Re: Add a Google Map image in caption to show GPS image position

Is it possible to define the maximum size of the caption section, then simpleviewer will define the size of all sections to fit on the screen  ?

This is, indeed, possible in the Pro version by setting floatCaption="FALSE" and captionHeight="300" (or whatever height you'd like).
http://simpleviewer.net/simpleviewer/pr … ml#caption

Or to have the thumbs on the top/left corner and not near the midle ?

This would also be possible in the Pro version by using a Fixed Layout.
http://simpleviewer.net/simpleviewer/pr … html#fixed

The best you can do in the Standard version is have only 1 row of thumbnails in order to give the captions as much space as possible.

Steven Speirs
SimpleViewer Support Team.

Re: Add a Google Map image in caption to show GPS image position

Hi,

Thanks for your support, if you want to see the result it's on the next url.
Since the Google map image is cut, it's better to see the gallery in full screen mode

http://nicolas.mareau.free.fr/Photo/test/index.html

Thanks again,

Regards
Nicolas

Re: Add a Google Map image in caption to show GPS image position

Nicolas/Steven:
I'm trying to the same basic thing as Nicolas... add a Google Map image to the corner of each page of my SimpleViewer gallery.  I've been able to get through the steps as you've outlined above; however, I'm trying to use Lightroom v3.4.1 to create the initial SimpleViewer gallery since my images are already geocoded. 

Here's my desired workflow:
1. Import RAW images into Lightroom that have not been geocoded
2. Use Jeff Friedl's Geoencoding LR plug-in to geocode the images in Lightroom and save the GPS coordinates to the EXIF metadata:
http://regex.info/blog/lightroom-goodies/gps
3. Use Turning Gate's SimpleViewer plug-in to create the SimpleViewer v2 compatible web gallery:
http://shop.theturninggate.net/collecti … mpleviewer
4. Add a Google Map image (and corresponding "a href" link) to the Caption field using LR's "Text Template Editor"
5. Export the web gallery
6. Modify the web gallery with SimpleViewer Pro to customize the look and feel.
7. Upload the web gallery to my website

The problem I'm running into currently is related to #4.  I see how I can calculate the Caption field in Lightroom field using the Text Template Editor, but I don't see a way to insert the GPS coordinates in a format compatible with Google Maps.  The GPS coordinates appear to be stored in Lightroom in Deg-Min-Sec (i.e. 50°6'22" N 8°40'37" E).  I need these to be exported in Decimal Degrees.

Any suggestions for how I can generate a Google Map compatible URL from Lightroom?  Or do you have any other ideas for a better workflow?

Also, one completely separate question:  does SimpleViewer support URL's to streaming video (i.e. YouTube, Flickr, etc)?  I'd like to include a few videos along with my photos in my gallery.

Thanks!
Dan

Re: Add a Google Map image in caption to show GPS image position

I am not familiar with Lightroom's 'Text Template Editor' but the method for converting Deg/Min/Sec to Decimal Degrees is as follows:
Decimal Degrees = degrees + (minutes / 60) + (seconds / 3600)
The result should be multiplied by -1 for a latitude of South or a longitude of West.
Also, the Google Map Parameters page here claims that:

An exact location can be specified as latitude,longitude, in decimal form (52.123N,2.456W or 52.123,-2.456) or as degrees, minutes and seconds (52 7 22.8N,2 27 21.6W or 52 7 22.8,-2 27 21.6) or as degrees and minutes (52 7.38N,2 27.36W or 52 7.38,-2 27.36).

... so conversion to Decimal Degrees may not be necessary.

does SimpleViewer support URL's to streaming video (i.e. YouTube, Flickr, etc)?  I'd like to include a few videos along with my photos in my gallery.

SimpleViewer does not support videos. Please see this FAQ for details: http://simpleviewer.net/simpleviewer/su … #general_1

Steven Speirs
SimpleViewer Support Team.

Re: Add a Google Map image in caption to show GPS image position

Thanks, Steven.  You're correct... looks like Google can handle Lat/Long in DMS format.  This is very helpful.

Another question regarding the map... is there a way to position the map separately from the Caption?  For instance, I'd like to have the map in the lower-left corner of the screen like Nicolas's example shows, but have the photo caption immediately below the main photo.  Seems like this would require different page elements (caption vs map).

I could also get by with putting the thumbnails at the bottom of the page in one row and putting the caption and map on the left or right side.  Is this supported?  All of the presets I see that have thumbnails on the bottom do not have captions.

Re: Add a Google Map image in caption to show GPS image position

is there a way to position the map separately from the Caption?

No. The map image is actually part of the caption itself.

I could also get by with putting the thumbnails at the bottom of the page in one row and putting the caption and map on the left or right side.  Is this supported?  All of the presets I see that have thumbnails on the bottom do not have captions.

This is supported in SimpleViewer-Pro only. With SimpleViewer-Standard (the free version), if you set thumbPosition="BOTTOM", then the captions will be included in an overlay on top of the main image.
With SimpleViewer-Pro, you also have the option captionPosition and you can therefore set thumbPosition="BOTTOM" in conjunction with captionPosition="RIGHT".

Steven Speirs
SimpleViewer Support Team.

Re: Add a Google Map image in caption to show GPS image position

I upgraded to SimpleViewer Pro and it's coming along nicely; however, I have one issue and one question:

Issue:  I would like to include caption text above and below the Google Map.  My caption tag currently looks like this:

<font size="10">October 15, 2011</font><br><br>
<a href="http://maps.google.com/maps?ll=50 6 22N,8 40 37E&spn=0.1,0.1&t=p&q=50 6 22N,8 40 37E" TARGET="_blank">
<img src="http://maps.google.com/maps/api/staticmap?center=50 6 22N,8 40 37E&zoom=10&size=230x230&maptype=terrain&markers=color:blue|50 6 22N,8 40 37E&sensor=false" /></a>
<br><br><font size="10">Frankfurt am Main, Germany</font><br><br>
<font size="16"><b>the Main river</b></font>

However, when I look at the rendered page (http://www.bigheaddan.com/bhd/2011Germany1), the city name below the Google Map is being truncated so I can only see a couple characters at the end of the name.  For example, instead of "Frankfurt am Main, Germany", only "in, Germany" is rendered.  I've tried quite a few things to get around this, but haven't found a solution.  Any ideas?

Question: can I add a white border around the Google map?  I tried using a "border=3" tag inside the IMG tag, but it's ignored.

Thanks again!

Re: Add a Google Map image in caption to show GPS image position

For example, instead of "Frankfurt am Main, Germany", only "in, Germany" is rendered.  I've tried quite a few things to get around this, but haven't found a solution.  Any ideas?

The text will try to wrap around the image in the same way that a web browser wraps text around media embedded in an HTML document. A few more line breaks between the <img> tag and the text should help.
I tried using a "border=3" ta … s ignored.
The atrtributes supported for the <img> tag within Flash are documented here: http://help.adobe.com/en_US/FlashPlatfo … l#htmlText
(Scroll down to the 'Image tag' section.)
Unfortunately, 'border' is not supported.
However, you could try using 'frame=true' in your Google Map's URL: http://code.google.com/apis/maps/docume … Parameters

Steven Speirs
SimpleViewer Support Team.