[kml-support] CDATA, img tag and tiff files

298 views
Skip to first unread message
Message has been deleted

RocketRob

unread,
Apr 28, 2010, 3:38:13 PM4/28/10
to KML Developer Support - Getting Started with KML
I am new to KML but have been generating Network Linked kml files to
track where a robotic vehicle goes. I drop a Placemark in the kml
file every time the vehicle takes a picture of its surroundings. The
problem I am having is that Google Earth does not display the tiff
image when it is inside a <BallonStyle> tag. If I use png, jpg, or
gif images though, GE displays everything properly.

So I am questioning if I am doing something wrong. Here is an example
of my style and placemark:

<Style id='picIcon'>
<IconStyle><Icon><href>http://maps.google.com/mapfiles/kml/shapes/
placemark_circle.png</href></Icon></IconStyle>
<BalloonStyle><text><![CDATA[<b>$[name]</b><br /><img src='file:///C:/
_snapshots/$[name].tif'/><br />]]></text></BalloonStyle></Style>
<Placemark><name>pic_1</name><styleUrl>#picIcon</
styleUrl><Point><coordinates>0,0,0</coordinates></Point></Placemark>

If I change .tif to .png and convert my images, everything works fine
so it appears that the <img> html tag can't load tif images within the
CDATA. Web posts seem to indicate that normal <img> tags in html can
load tif images just fine. Using a <GroundOverlay> with tif works as
well, but due to the closeness of the images, I want to use
Placemarks, and do not want to invest in having the vehicle software
write png's if I don't have to.

Any information is appreciated.

Thanks,
-Rob

p.s. sorry for the post with half this message, stupid tab button gets
me every time.

--
You received this message because you are subscribed to the Google Groups "Getting Started with KML" group.
To post to this group, send email to kml-support-g...@googlegroups.com.
To unsubscribe from this group, send email to kml-support-getting...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/kml-support-getting-started?hl=en.

barryhunter (KML Guru)

unread,
Apr 28, 2010, 6:37:53 PM4/28/10
to KML Developer Support - Getting Started with KML
While TIFF might work in some browsers, it wont work in all.

And placemarks are pretty much a browser (webkit based).


About my only suggestion is to try a PhotoOverlay. Would probably work
particully well if you also capture the view direction the photo was
taken in!
> To post to this group, send email to [email address].
> To unsubscribe from this group, send email to [email address].

RocketRob

unread,
Apr 29, 2010, 12:48:55 PM4/29/10
to KML Developer Support - Getting Started with KML
Thanks BarryHunter,
The <PhotoOverlay> doesn't seem to support the .tif format either
at least in GE, so I will incorporate LibPng into my source code and
write .png files which work for the <Placemark> and <PhotoOverlay>. I
will try adding the viewing angle info to the <PhotoOverlay> which
would be super cool. Thanks for the assistance.

-RocketRob
Reply all
Reply to author
Forward
0 new messages