In Google Earth, my balloons are not pointing at the correct location on my line when they open. They are waaaay off. I read a few places that this can be fixed by adding a point to a multigeometry placemark and it will point to that instead. But it's not working! Is there a fix to this? I am using a mac and Google Earth 7.1
Thanks,
Ellen
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>KmlFile</name>
<Schema name="Gorge_Trails" id="Trails_Schema_id">
<SimpleField type="string" name="Trail_number"><displayName><b>Trail_number</b></displayName>
</SimpleField>
<SimpleField type="string" name="Trail_name"><displayName><b>Trail_name</b></displayName>
</SimpleField>
<SimpleField type="string" name="Location"><displayName><b>Location</b></displayName>
</SimpleField>
<SimpleField type="string" name="Difficulty"><displayName><b>Difficulty</b></displayName>
</SimpleField>
<SimpleField type="string" name="Picture_URL"><displayName><b>Picture_URL</b></displayName>
</SimpleField>
<SimpleField type="string" name="Link1"><displayName><b>Link1</b></displayName>
</SimpleField>
<SimpleField type="string" name="Link2"><displayName><b>Link2</b></displayName>
</SimpleField>
<SimpleField type="string" name="Photo_credit"><displayName><b>Photo_credit</b></displayName>
</SimpleField>
<SimpleField type="double" name="Hike_Dist"><displayName><b>Hike_Dist</b></displayName>
</SimpleField>
<SimpleField type="string" name="Trailhead"><displayName><b>Trailhead</b></displayName>
</SimpleField>
<SimpleField type="string" name="Type"><displayName><b>Type</b></displayName>
</SimpleField>
<SimpleField type="double" name="TR_Length"><displayName><b>TR_Length</b></displayName>
</SimpleField>
<SimpleField type="string" name="Hike_Name"><displayName><b>Hike_Name</b></displayName>
</SimpleField>
<SimpleField type="string" name="State"><displayName><b>State</b></displayName>
</SimpleField>
<SimpleField type="string" name="Elevation1"><displayName><b>Elevation1</b></displayName>
</SimpleField>
<SimpleField type="string" name="Hike_Dis_1"><displayName><b>Hike_Dis_1</b></displayName>
</SimpleField>
</Schema>
<Style id="Hikes_highlight_traillink">
<IconStyle>
<color>0000ffff</color>
<scale>0.1</scale>
</IconStyle>
<BalloonStyle>
<text><![CDATA[<table border="0">
<table width="250" border="0" cellspacing="0" cellpadding="1" bgcolor="#e8e9cb" align="center">
<tr>
<td colspan="2" align="center">
<img src="http://gorgefriends.org/img/gorge_index_02.gif" alt="picture" width="100%" height="50"/>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e'size=+2> <b>$[Gorge_Trails/Hike_Name]</b></font>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e' size=+1 <b>$[Gorge_Trails/Location], $[Gorge_Trails/State]</b></font>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src=$[Gorge_Trails/Picture_URL] alt="picture" width="100%" height="140"/>
</td>
<tr>
<td colspan="2" align="center">
<font color="#999999" size="1">Photo:$[Gorge_Trails/Photo_credit]</font>
</td>
</tr>
<table width="250" border="0" cellspacing="3" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><b>Trailhead</b></td><td>$[Gorge_Trails/Trailhead]</td></tr>
<tr><td><b>Hike Distance</b></td><td>$[Gorge_Trails/Hike_Dist] miles</td></tr>
<tr><td><b>Difficu
lty</b></td><td>$[Gorge_Trails/Difficulty]</td></tr>
<tr><td><b>Type</b></td><td>$[Gorge_Trails/Type]</td></tr>
<tr><td><b>Trail Name</b></td><td>$[Gorge_Trails/Trail_name]</td></tr>
<table width="250" border="0" cellspacing="4" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><font color=#993300>Rails-to-Trails</font color>
</td></tr>
<table width="250" border="0" cellspacing="1" cellpadding="0" bgcolor="#e8e9cb" align="center"> <tr>
<td colspan="2" align="center" valign="bottom">
<font color="#999999" size="1">Copyright: Friends of the Columbia Gorge/Portlandhikers.org is a proud partner of the</font> Gorge Towns to Trails Initiative</font>
</td>
</tr>
</table>]]></text>
<bgColor>ff689a9a</bgColor>
</BalloonStyle>
<ListStyle>
<maxSnippetLines>0</maxSnippetLines>
</ListStyle>
<LineStyle>
<color>ff1eede9</color>
<width>4</width>
</LineStyle>
</Style>
<Style id="Hikes_normal_traillink">
<IconStyle>
<color>0000ffff</color>
<scale>0.1</scale>
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<BalloonStyle>
<text><![CDATA[<table border="0">
<table width="250" border="0" cellspacing="0" cellpadding="1" bgcolor="#e8e9cb" align="center">
<tr>
<td colspan="2" align="center">
<img src="http://gorgefriends.org/img/gorge_index_02.gif" alt="picture" width="100%" height="50"/>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e'size=+2> <b>$[Gorge_Trails/Hike_Name]</b></font>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e' size=+1 <b>$[Gorge_Trails/Location], $[Gorge_Trails/State]</b></font>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src=$[Gorge_Trails/Picture_URL] alt="picture" width="100%" height="140"/>
</td>
<tr>
<td colspan="2" align="center">
<font color="#999999" size="1">Photo:$[Gorge_Trails/Photo_credit]</font>
</td>
</tr>
<table width="250" border="0" cellspacing="3" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><b>Trailhead</b></td><td>$[Gorge_Trails/Trailhead]</td></tr>
<tr><td><b>Hike Distance</b></td><td>$[Gorge_Trails/Hike_Dist] miles</td></tr>
<tr><td><b>Difficulty</b></td><td>$[Gorge_Trails/Difficulty]</td></tr>
<tr><td><b>Type</b></td><td>$[Gorge_Trails/Type]</td></tr>
<tr><td><b>Trail Name</b></td><td>$[Gorge_Trails/Trail_name]</td></tr>
<table width="250" border="0" cellspacing="4" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><font color=#993300>Rails-to-Trails</font color>
</td></tr>
<table width="250" border="0" cellspacing="1" cellpadding="0" bgcolor="#e8e9cb" align="center"> <tr>
<td colspan="2" align="center" valign="bottom">
<font color="#999999" size="1">Copyright: Friends of the Columbia Gorge/Portlandhikers.org is a proud partner of the</font> Gorge Towns to Trails Initiative</font>
</td>
</tr>
</table>]]></text>
<bgColor>ff689a9a</bgColor>
</BalloonStyle>
<ListStyle>
<maxSnippetLines>0</maxSnippetLines>
</ListStyle>
<LineStyle>
<color>ff000080</color>
<width>2</width>
</LineStyle>
</Style>
<StyleMap id="Hikes_style_traillink">
<Pair>
<key>normal</key>
<styleUrl>#Hikes_normal_traillink</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#Hikes_highlight_traillink</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>The Dalles Trail</name>
<LookAt>
<longitude>-121.1675204504952</longitude>
<latitude>45.63510133211322</latitude>
<altitude>0</altitude>
<heading>-1.634887800693966e-09</heading>
<tilt>45.00165866539888</tilt>
<range>11801.15617415238</range>
<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
</LookAt>
<styleUrl>#Hikes_style_traillink</styleUrl>
<ExtendedData>
<SchemaData schemaUrl="#Trails_Schema_id">
<SimpleData name="Trail_number">4406</SimpleData>
<SimpleData name="Trail_name">The Dalles Trail</SimpleData>
<SimpleData name="Location">Eastern Gorge</SimpleData>
<SimpleData name="Difficulty">Easy</SimpleData>
<SimpleData name="Picture_URL">http://blog.oregonlive.com/terryrichard/2009/05/large_TR.TheDallesTrail.jpg</SimpleData>
<SimpleData name="Link1">http://gorgefriends.org/display.php?modin=51&uid=4921</SimpleData>
<SimpleData name="Link2">http://www.traillink.com/trail/the-dalles-riverfront-trail.aspx#tabPhotoGallery</SimpleData>
<SimpleData name="Photo_credit">Terry Richard/The Oregonian</SimpleData>
<SimpleData name="Hike_Dist">11.2</SimpleData>
<SimpleData name="Trailhead">The Dalles Trailhead</SimpleData>
<SimpleData name="Type">Out and Back</SimpleData>
<SimpleData name="TR_Length">0</SimpleData>
<SimpleData name="Hike_Name">The Dalles Rail Trail</SimpleData>
<SimpleData name="State">Oregon</SimpleData>
<SimpleData name="Elevation1">200 ft.</SimpleData>
<SimpleData name="Hike_Dis_1">miles</SimpleData>
<SimpleData name="POINT_X">-121.197</SimpleData>
<SimpleData name="POINT_Y">45.6276</SimpleData>
</SchemaData>
</ExtendedData>
<gx:balloonVisibility>1</gx:balloonVisibility>
<MultiGeometry>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-121.2191227996079,45.65623491828678,0 -121.2078460984247,45.641231128264,0 -121.2081174642494,45.62199596450162,0 -121.2013742163807,45.61232779014134,0 -121.1763471207253,45.60147362786477,0 -121.1389784963313,45.6012101599156,0 -121.1150449368218,45.61651025155123,0 -121.1141521992769,45.62130724242957,0
</coordinates>
</LineString>
<Point>
<coordinates>-121.197032272514,45.62764529609835,0</coordinates>
</Point>
</MultiGeometry>
</Placemark>
</Document>
</kml>
The anchor spot where the Balloon is positioned on the map is computed as the center point of the geometries in the feature. In the case of the MultiGeometry in your example it is the center of the line and the point combined. The extent of the line is skewing the center to the right.
If you want the balloon anchored at the point then move the LineString to a second feature.
You can hide the fact that you have two features instead of one by adding a ListStyle of type checkHideChildren to the root-level Document to hide the children features like this:
<Document>
<name>KmlFile</name>
<styleUrl>#checkHide</styleUrl>
<Style id="checkHide">
<ListStyle>
<listItemType>checkHideChildren</listItemType>
</ListStyle>
</Style>
...
<Placemark>
<name>The Dalles Trail</name>
<!-- LookAt, ExtendedData, etc. -->
<Point>...</Point>
</Placemark>
<Placemark>
<LineString>...</LineString>
</Placemark>
</Document>
Related
I Have a Attribute that I want to display, but I only want to display the last portion of it indicated by an "-". I am using substring-after to do this but this only works if there is one charactor. There are occasions where there might be one and some where there is two. I have seen some recursive templates for this but I have not seen them in a For-each Loop like I have it here and I am not sure where I would put everything in my XSL document.
Here is my XML document:
<?xml version="1.0" encoding="UTF-8"?>
<JobList>
<Job T.number="28" />
<Job T.identifier="10mm Drill" />
<Job oper.jobName="2: T28-Contour Milling - Grind me back" />
<Job T.number="3" />
<Job T.identifier="9mm Drill" />
<Job oper.jobName="3: T3 Contour Milling" />
</JobList>
Here is my XSL Document. I am using XSL 1.0. The result I am looking for is I want this to be displayed as "10mm Drill - Grind me back" not "10mm Drill-Contour Milling - Grind me back" which is what I am getting now using the substring-after function or something with the same result.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" encoding="UTF-8" method="xml" />
<xsl:param name="REPORT">joblist</xsl:param>
<xsl:param name="LOCALE">en-GB</xsl:param>
<xsl:param name="FORMAT">html</xsl:param>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Tool Report</title>
</head>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="JobList">
<div style="font-size:;">
<table width="100%" style="margin-bottom:50px;font:bold 10px arial;">
<thead>
<tr>
<th style="text-align:center;font-family:Arial;font-size:13;font:bold 7px arial;">
<xsl:value-of select="#month">
</xsl:value-of>
<span>.</span>
<xsl:value-of select="#day">
</xsl:value-of>
<span>.</span>
<xsl:value-of select="#year">
</xsl:value-of>
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center;font:normal 7px arial;font-size:12px;">
<xsl:value-of select="//Job[position()=1]/#cfg.JOBLISTNAME" />
<span>
</span>
<span>
</span>
</td>
</tr>
</tbody>
<table width="100%" border="1" style="margin-bottom:50px;font:13px arial;">
<thead style="font:19;">
<tr style="font-size:19;">
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
<td style="text-align:center;font-weight:bold;font-size:19;">
</td>
</tr>
</thead>
<tbody style="font-size:19;">
<xsl:for-each select="//Job[not(#T.number=preceding::Job/#T.number)]">
<tr style="font-size:19;">
<td style="font-size:19;">
<xsl:value-of select="#T.number" />
</td>
<td>
</td>
<td style="font-size:19;">
<xsl:value-of select="#T.identifier" />
<xsl:choose>
<xsl:when test="contains(#T.toolComment3, 'GRIND') or contains(#T.toolComment3, 'Grind')">
<xsl:value-of select="#T.toolComment3" />
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="contains(#T.comment2, 'GRIND') or contains(#T.comment2, 'Grind')">
<xsl:value-of select="#T.comment2" />
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="contains(#oper.jobName, 'GRIND') or contains(#oper.jobName, 'Grind')">
<xsl:value-of select="substring-after(#oper.jobName, '-')" />
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</table>
</div>
</xsl:template>
</xsl:stylesheet>
Use a named recursive template to get the last token of the text string.
<xsl:template name="last-token">
<xsl:param name="text"/>
<xsl:param name="delimiter" select="'-'"/>
<xsl:choose>
<xsl:when test="contains($text, $delimiter)">
<!-- recursive call -->
<xsl:call-template name="last-token">
<xsl:with-param name="text" select="substring-after($text, $delimiter)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Example of call: http://xsltransform.net/bFWR5Ew
I am trying to fix a problem with an html email where horizontal gaps appear between images that does not exist in the code. I have been on the site and have tried everything anyone has suggested to people who have previously had this problem. I have added display:block, font-size: 0px, lineheight:0px, made sure all padding, margins, and borders were set to 0. I have run out of ideas and was hoping someone can help me. I have outlook 2010 and have tested the email on chrome and explorer for gmail. If you have any suggestions or can help in any way I would really appreciate it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Spring_Back_Into_Action_email_blastv3.jpg) -->
<table style="lineheight:0px; display:block; border-collapse:collapse" width="600" height="814" cellpadding="0" cellspacing="0" margin="0" border="0" padding="0" align="top">
<tr style="font-size: 0px;"><td style="font-size: 0px;" colspan="3"><img src="http://s6.postimg.org/lw56vewpt/Spring_Back_Into_Action_email_blastv5_01.jpg" width="600" height="328" align="top" style="display:block" margin="0" border="0" padding="0"></td></tr>
<tr style="font-size: 0px;"><td style="font-size: 0px;" colspan="3"><img src="http://s6.postimg.org/sp5jronj5/Spring_Back_Into_Action_email_blastv5_02.jpg" width="600" height="251" align="top" style="display:block" margin="0" border="0" padding="0"></td></tr>
<tr style="font-size: 0px;"><td style="font-size: 0px;"><img src="http://s6.postimg.org/93h2vhl3x/Spring_Back_Into_Action_email_blastv5_03.jpg" width="175" height="107" align="top" style="display:block" margin="0" border="0" padding="0"></td>
<td style="font-size: 0px;"><img src="http://s6.postimg.org/c91olp3q9/Spring_Back_Into_Action_email_blastv3_04.jpg" width="253" height="107" align="top" style="display:block" margin="0" border="0" padding="0" alt="link to http://www.dallasbioidenticalhormonedoctor.com/"></td>
<td style="font-size: 0px;"><img src="http://s6.postimg.org/i11ssudjx/Spring_Back_Into_Action_email_blastv5_05.jpg" width="172" height="107" align="top" style="display:block" margin="0" border="0" padding="0"></td></tr>
<tr style="font-size: 0px;"><td colspan="2"><img src="http://s6.postimg.org/7lvmjxgdd/Spring_Back_Into_Action_email_blastv3_06.jpg" width="428" height="128" align="top" style="display:block" margin="0" border="0" padding="0" alt="link to http://www.emtexas.com/"></td>
<td style="font-size: 0px;"><img src="http://s6.postimg.org/4mtbajw9p/Spring_Back_Into_Action_email_blastv5_07.jpg" width="172" height="128" align="top" style="display:block" margin="0" border="0" padding="0"></td></tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
Outlook uses Word as an email editor. You can read about supported and unsupported HTML elements, attributes, and cascading style sheets properties in the following series of articles in MSDN:
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 1 of 2)
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 2 of 2)
I have 100's of points that have a photo for each of the points that are stored on my local drive. Each point has extended data, which includes the root of the picture name (bee-tree)
I have my set up to reference using this line: img src="/files/$[geotourism_points/PIC_NAME].png", which works when I save it as a kml. However, when I save it as a .kmz it ignores the $[geotourism_points/ and only returns img src="files/PIC_NAME].png"
I have tried using relative path names using ../files/image.png, /files/image.png, files/image.png (which one do you use?!!)
I still can't get it to work. Can I insert images into my balloon this way (local files), or will I have to load these to a server and reference them using the URL?
Thanks in advance for your help!
Here is the whole code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>KmlFile</name>
<Schema name="geotourism_points" id="geotourism_points_schema">
<SimpleField type="string" name="MO_REGIO_1"><displayName><b>MO_REGIO_1</b></displayName>
</SimpleField>
<SimpleField type="string" name="TYPE"><displayName><b>TYPE</b></displayName>
</SimpleField>
<SimpleField type="string" name="NOTES_1"><displayName><b>NOTES_1</b></displayName>
</SimpleField>
<SimpleField type="string" name="WEBSITE"><displayName><b>WEBSITE</b></displayName>
</SimpleField>
<SimpleField type="string" name="SITE_NAME"><displayName><b>SITE_NAME</b></displayName>
</SimpleField>
<SimpleField type="string" name="LINK_2"><displayName><b>LINK_2</b></displayName>
</SimpleField>
<SimpleField type="string" name="ADDRESS"><displayName><b>ADDRESS</b></displayName>
</SimpleField>
<SimpleField type="string" name="PHONE"><displayName><b>PHONE</b></displayName>
</SimpleField>
<SimpleField type="string" name="PIC_NAME"><displayName><b>PIC_NAME</b></displayName>
</SimpleField>
<SimpleField type="string" name="SOURCE_1"><displayName><b>SOURCE_1</b></displayName>
</SimpleField>
<SimpleField type="int" name="NATUR"><displayName><b>NATUR</b></displayName>
</SimpleField>
<SimpleField type="int" name="CULTU"><displayName><b>CULTU</b></displayName>
</SimpleField>
<SimpleField type="int" name="REC"><displayName><b>REC</b></displayName>
</SimpleField>
<SimpleField type="int" name="ARCHEO"><displayName><b>ARCHEO</b></displayName>
</SimpleField>
<SimpleField type="int" name="HIST"><displayName><b>HIST</b></displayName>
</SimpleField>
<SimpleField type="double" name="OBJECTID"><displayName><b>OBJECTID</b></displayName>
</SimpleField>
</Schema>
<StyleMap id="pointStyleMap">
<Pair>
<key>normal</key>
<styleUrl>#normPointStyle</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#normPointStyle0</styleUrl>
</Pair>
</StyleMap>
<Style id="normPointStyle0">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
</Icon>
</IconStyle>
<BalloonStyle>
<text><![CDATA[<table width="350" cellpadding="1" cellspacing="0">
<tr>
<td colspan="3" align="center" valign="top">
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td align="left" valign="top">
<img src="files/lecl_logo.png" alt="logo"/>
</td>
<td width="70%"" align="left" valign="bottom">
<font color="#2f4f4f" size="+2"><strong>$[geotourism_points/SITE_NAME]</strong></font>
<br>
<font color="#999999"><em>$[geotourism_points/TYPE] </em></font>
<hr/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">
<p>
<br>
<font color="#666666"><strong>Visitor's Information:</strong></font>
<br><br>
<font color="#999999">$[geotourism_points/ADDRESS]<br>$[geotourism_points/PHONE]</font>
</p>
<p>
<strong><em><font color="#2f4f4f">More Information...</font></strong></em>
</p>
</td>
<td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="3" bgcolor="white">
<tr>
<td align="center"><img src="files/$[geotourism_points/PIC_NAME].png" alt="picture" width="100%" align="left" valign="middle"/></td>
</tr>
<tr>
<td colspan="3" align="right"><font color="#999999" size="-1">$[geotourism_points/SOURCE_1]</font></td>
</tr>
</td>
</table>]]></text>
</BalloonStyle>
</Style>
<Style id="normPointStyle">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
</Icon>
</IconStyle>
<BalloonStyle>
<text><![CDATA[<table width="350" cellpadding="1" cellspacing="0">
<tr>
<td colspan="3" align="center" valign="top">
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td align="left" valign="top">
<img src="files/lecl_logo.png" alt="logo"/>
</td>
<td width="70%"" align="left" valign="bottom">
<font color="#2f4f4f" size="+2"><strong>$[geotourism_points/SITE_NAME]</strong></font>
<br>
<font color="#999999"><em>$[geotourism_points/TYPE] </em></font>
<hr/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">
<p>
<br>
<font color="#666666"><strong>Visitor's Information:</strong></font>
<br><br>
<font color="#999999">$[geotourism_points/ADDRESS]<br>$[geotourism_points/PHONE]</font>
</p>
<p>
<strong><em><font color="#2f4f4f">More Information...</font></strong></em>
</p>
</td>
<td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="3" bgcolor="white">
<tr>
<td align="center"><img src="files/$[geotourism_points/PIC_NAME].png" alt="picture" width="100%" align="left" valign="middle"/></td>
</tr>
<tr>
<td colspan="3" align="right"><font color="#999999" size="-1">$[geotourism_points/SOURCE_1]</font></td>
</tr>
</td>
</table>]]></text>
</BalloonStyle>
</Style>
<Folder id="layer 0">
<name>geotourism_points</name>
<open>1</open>
<Placemark>
<name>Bee Tree County Park</name>
<styleUrl>#pointStyleMap</styleUrl>
<ExtendedData>
<SchemaData schemaUrl="#geotourism_points_schema">
<SimpleData name="MO_REGIO_1">Confluence Region</SimpleData>
<SimpleData name="TYPE">City/County Park</SimpleData>
<SimpleData name="NOTES_1">riverfront</SimpleData>
<SimpleData name="WEBSITE">stlouisco.com/ParksandRecreation/ParkPages/BeeTree</SimpleData>
<SimpleData name="SITE_NAME">Bee Tree County Park</SimpleData>
<SimpleData name="LINK_2"></SimpleData>
<SimpleData name="ADDRESS">2701 Finestown Road Saint Louis, MO 63129</SimpleData>
<SimpleData name="PHONE"></SimpleData>
<SimpleData name="PIC_NAME">bee-tree</SimpleData>
<SimpleData name="SOURCE_1">stlouisco.com</SimpleData>
<SimpleData name="NATUR">1</SimpleData>
<SimpleData name="CULTU">0</SimpleData>
<SimpleData name="REC">1</SimpleData>
<SimpleData name="ARCHEO">0</SimpleData>
<SimpleData name="HIST">0</SimpleData>
<SimpleData name="OBJECTID">234</SimpleData>
</SchemaData>
</ExtendedData>
<Point>
<coordinates>-90.32844745921075,38.40766261103909,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Old St. Ferdinand Shrine</name>
<styleUrl>#pointStyleMap</styleUrl>
<ExtendedData>
<SchemaData schemaUrl="#geotourism_points_schema">
<SimpleData name="MO_REGIO_1">Confluence Region</SimpleData>
<SimpleData name="TYPE">Historic Site</SimpleData>
<SimpleData name="NOTES_1"></SimpleData>
<SimpleData name="WEBSITE">http://www.oldstferdinandshrine.com/</SimpleData>
<SimpleData name="SITE_NAME">Old St. Ferdinand Shrine</SimpleData>
<SimpleData name="LINK_2"></SimpleData>
<SimpleData name="ADDRESS">#1 rue St. Francois, Florissant MO 63031</SimpleData>
<SimpleData name="PHONE">Phone: (314) 837-2110</SimpleData>
<SimpleData name="PIC_NAME">old-st-ferdinand-shrine</SimpleData>
<SimpleData name="SOURCE_1">viewfrombackpew.blogspot.com</SimpleData>
<SimpleData name="NATUR">0</SimpleData>
<SimpleData name="CULTU">0</SimpleData>
<SimpleData name="REC">0</SimpleData>
<SimpleData name="ARCHEO">0</SimpleData>
<SimpleData name="HIST">1</SimpleData>
<SimpleData name="OBJECTID">269</SimpleData>
</SchemaData>
</ExtendedData>
<Point>
<coordinates>-90.33389390094645,38.79675526749391,0</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>
Depends on your target audience. Do want to share KMZ on Internet or on an internal web site with photos on a shared network drive, etc?
If the KMZ file is local and relative to the KMZ file is the folder "files" with all your photos then it will display correctly in Google Earth as-is.
If you're serving the KMZ file from a website and the files are local then it won't work. The images must be co-resident with the KML file if using relative links.
<img src="files/$[geotourism_points/PIC_NAME].png" alt="picture" .../>
If you use absolute URLs in KML to the photo location then the KMZ will work where ever you host it.
<img src="http://server/files/$[geotourism_points/PIC_NAME].png" alt="picture" .../>
Alternative is embed the "files" folder and photos within the KMZ so the KML and photos are self-contained. Then you can use relative links in the KML.
I have the following simple xpage with a xp:viewPanel :
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:viewPanel rows="30" id="viewPanel1" disableTheme="true">
<xp:this.data>
<xp:dominoView var="view1" viewName="testView"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="$0" id="viewColumn1">
<xp:viewColumnHeader value="Col 1" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:view>
Although pagers are disabled for header and footer, the generated HTML has always a leading an closing empty row around the view data:
<table id="view:_id1:viewPanel1_OUTER_TABLE" cellspacing="0" cellpadding="0">
<tr>
<td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3" style="padding:0px" width="100%" height="100%" valign="top">
<table id="view:_id1:viewPanel1">
<thead>
<tr>
<th scope="col">
<div><span><span id="view:_id1:viewPanel1:viewColumn1:__internal_header_title_id">Col 1</span></span></div>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span id="view:_id1:viewPanel1:0:viewColumn1:_internalViewText"> </span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td> </td><td> </td><td> </td>
</tr>
</table>
What can I do to hide/ delete this empty rows?
I already added an empty theme and used it in the test database, but that did not help:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="platform:/plugin/com.ibm.designer.domino.stylekits/schema/stylekit.xsd">
</theme>
I am using Domino Domino 8.5.3 Upgrade Pack 1
Thx in advance
Daniel
Edit 04/24/2012 :
Thanks to Ulrich Krause, his answer gave me the right direction and I ended up in writing my own theme extension.
<theme extends="webstandard" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="platform:/plugin/com.ibm.designer.domino.stylekits/schema/stylekit.xsd">
<!-- ================== View Table with no footer and header ================================ -->
<!-- View DataTable - copied from webstandard theme and customized (Notes\xsp\nsf\themes)-->
<control >
<name>DataTable.ViewPanelNoHeaderFooter</name>
<property>
<name>headerEndStyle</name>
<value>display: none;</value>
</property>
<property>
<name>headerStartStyle</name>
<value>display: none;</value>
</property>
<property>
<name>headerStyle</name>
<value>display: none;</value>
</property>
<property>
<name>footerStyle</name>
<value>display: none;</value>
</property>
<property>
<name>footerStartStyle</name>
<value>display: none;</value>
</property>
<property>
<name>footerEndStyle</name>
<value>display: none;</value>
</property>
</control>
</theme>
With that theme extension i can set the theme id for my xp:viewPanel to "DataTable.ViewPanelNoHeaderFooter" where needed and the header and footer row are hidden.
<xp:viewPanel rows="30" id="viewPanel1"
themeId="DataTable.ViewPanelNoHeaderFooter">
<xp:this.data>
<xp:dominoView var="view1" viewName="testView"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="$0" id="viewColumn1">
<xp:viewColumnHeader value="Col 1" id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
I'm using a theme for this. It sets the empty .xspDataTableViewPanelHeaderStart etc to display:none.
Inspect with firebug to find the elements. Would post solution, but only have a smartphone at the moment.
Try using disableTheme="true" as a property of the pager and see if that gets rid of the code.
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1" disableTheme="true">
</xp:pager>
I recently switched my Eclipse Indigo project from JSF 1.2 to JSF 2.1 (using MyFaces). Using Tomcat 7.
Strange thing happens: I set up a project, and it works fine for some short
time, and then suddenly (maybe after I do "clean") stops working in a sense that
clicking a command link does not produce any action, backing bean's method is not
called, just nothing happens. I have tried to do project "clean" and Eclipse
restart, and even system restart but it did not help. Only thing that helped is
that I created a brand new workspace, and new project - but same thing happened:
this too worked only for short time and suddenly stoped working in the same way
- command links are just not reacting to clicks, and there is no way I can debug Java
code to at least localize the problem.
What could be the reason for such a strange behaviour?
Thanks in advance.
Update: this is the JavaScript error reported:
myfaces is not defined
onclick()onclick (line 2)
event = click clientX=840, clientY=252
return myfaces.oam.submitForm("j_id_6", "j_id_6:LOGIN");
function onclick(event) {
return myfaces.oam.submitForm("j_id_6", "j_id_6:LOGIN");
}
Here is the original XHTML file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Login</title>
</h:head>
<body style="background-color:#3d3d3d;" text="#000000" link="#cc0000" alink="#666666" vlink="#cc0000" onload="document.forms[0].USERNAME.focus();">
<f:view>
<h:form target="_top">
<table border="0" align="center" width="810" style="border: 2px black solid; background-image:url(images/header.jpg); margin:auto;" cellspacing="0" cellpadding="0">
<tr>
</tr>
</table>
<table align="center" width="810" style="border: 2px black solid; background-color:#ffffff;" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10" colspan="3" align="center" valign="middle">
</td>
</tr>
<tr>
<td colspan="3">
<table width="778" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="778"><h1>Login</h1>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20"><font class="text">User Name: </font></td>
<td height="20"><font class="text"><t:inputText forceId="true" id="USERNAME" maxlength="50" value="#{LoginBean.username}" size="26" /></font></td>
</tr>
<tr>
<td height="20"><font class="text">Password: </font></td>
<td height="20"><font class="text"><h:inputSecret maxlength="30" value="#{LoginBean.password}" size="26" /></font></td>
</tr>
<tr>
<td height="20" colspan="2" align="right"><h:commandLink id="LOGIN" action="#{LoginBean.doLogin}"><h:graphicImage style="border: none" value="images/login.png" /></h:commandLink></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</body>
</html>
Here is the generated HTML:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Login</title></head>
<body style="background-color:#3d3d3d;" text="#000000" link="#cc0000" alink="#666666" vlink="#cc0000" onload="document.forms[0].USERNAME.focus();"><form id="j_id2030916047_790d5181" name="j_id2030916047_790d5181" method="post" action="/EWC/login.faces" enctype="application/x-www-form-urlencoded" target="_top">
<table border="0" align="center" width="810" style="border: 2px black solid; background-image:url(images/header.jpg); margin:auto;" cellspacing="0" cellpadding="0">
<tr>
</tr>
</table>
<table align="center" width="810" style="border: 2px black solid; background-color:#ffffff;" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10" colspan="3" align="center" valign="middle">
</td>
</tr>
<tr>
<td colspan="3">
<table width="778" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="778"><h1>Login</h1>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20"><font class="text">User Name: </font></td>
<td height="20"><font class="text"><input id="USERNAME" name="USERNAME" type="text" value="" maxlength="50" size="26" /></font></td>
</tr>
<tr>
<td height="20"><font class="text">Password: </font></td>
<td height="20"><font class="text"><input type="password" name="j_id2030916047_790d5181:j_id2030916047_790d51ba" maxlength="30" size="26" /></font></td>
</tr>
<tr>
<td height="20" colspan="2" align="right"><script type="text/javascript" src="/EWC/javax.faces.resource/oamSubmit.js.faces?ln=org.apache.myfaces"></script><img src="images/login.png" style="border: none" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table><input type="hidden" name="j_id2030916047_790d5181_SUBMIT" value="1" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="5s3ZqoVcUIwarcQb6pVzFIPhMJIzbVHnjMrXdtgA1Nten7grU/y0hMGbHtFvIExuKQOwB3IGzcSDeuPfijYMcnK23q/2N1mduMdr6RskySGELSaI2w93nL9b8NE=" /></form>
</body>
</html>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
add it in ur Web.xml
everything will start.