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>
Related
Trying to give the possibility to generate a pdf in xpages
The code I have :
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources>
<xp:script src="generate.js" clientSide="true"></xp:script>
</xp:this.resources>
<script type='text/javascript' src='js/jspdf.min.js'></script>
<script type="text/javascript" src="js/jspdf.plugin.autotable.js"></script>
<button onclick="generate()">Generate PDF</button>
<xp:br></xp:br>
<xp:br></xp:br>
<table id="basic-table" >
<thead>
<tr>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
<th>Email</th>
<th>Country</th>
<th>IP-address</th>
</tr>
</thead>
<tbody>
<tr>
<td align="right">1</td>
<td>Donna</td>
<td>Moore</td>
<td>dmoore0#furl.net</td>
<td>China</td>
<td>211.56.242.221</td>
</tr>
<tr>
<td align="right">2</td>
<td>Janice</td>
<td>Henry</td>
<td>jhenry1#theatlantic.com</td>
<td>Ukraine</td>
<td>38.36.7.199</td>
</tr>
<tr>
<td align="right">3</td>
<td>Ruth</td>
<td>Wells</td>
<td>rwells2#constantcontact.com</td>
<td>Trinidad and Tobago</td>
<td>19.162.133.184</td>
</tr>
<tr>
<td align="right">4</td>
<td>Jason</td>
<td>Ray</td>
<td>jray3#psu.edu</td>
<td>Brazil</td>
<td>10.68.11.42</td>
</tr>
<tr>
<td align="right">5</td>
<td>Jane</td>
<td>Stephens</td>
<td>jstephens4#go.com</td>
<td>United States</td>
<td>47.32.129.71</td>
</tr>
<tr>
<td align="right">6</td>
<td>Adam</td>
<td>Nichols</td>
<td>anichols5#com.com</td>
<td>Canada</td>
<td>18.186.38.37</td>
</tr>
</tbody>
</table>
<xp:br></xp:br>
</xp:view>
I'm getting an error in the console :
Uncaught ReferenceError: jsPDF is not defined
at generate (generate:3)
at HTMLButtonElement.onclick (test_pdf2.xsp:20)
generate # generate:3
onclick # test_pdf2.xsp:20
and line 3 of generate.js = var doc = new jsPDF('p','pt');
When I have a look at the sources I can see under js the 2 libraries
What's wrong ?
jsPDF uses AMD. Here's a snippet from the jspdf.min.js source code where AMD is used:
function"==typeof define&&define.amd?define(e)
Unfortunately AMD loading conflicts with Dojo in XPages. See this answer on how to remove AMD loading.
You need to change the AMD loading part by changing the code in jspdf.min.js to this:
function"==typeof define&&false?define(e)
jspdf.plugin.autotable.js uses AMD too. Here you need to replace define.amd with false too.
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.
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>
I have document Library where the ColumnName is Name and the data is hyperlinked to Documents.
I want to access this through xslt.
My xsl code is given below:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
exclude-result-prefixes="msxsl" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method='html' indent='yes'/>
<xsl:template match='dsQueryResponse'>
<table cellpadding="10" cellspacing="0" border="1" style="padding:25px;">
<tr>
<td colspan='2'>
<b style="font-size:25px;">NewsLetter List</b>
</td>
</tr>
<xsl:apply-templates select='Rows/Row'/>
</table>
</xsl:template>
<xsl:template match='Row'>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<b>
<img src="../PublishingImages/newsletter_icon.png" width="20px" height="20px"></img>
</b>
</td>
<td>
<xsl:value-of select="#Name"/>
</td>
</tr>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Assuming the source XML contains the same attributes that are available by default, could you try replacing this:
<td>
<xsl:value-of select="#Name"/>
</td>
With this:
<td>
<a href="{#FileRef}">
<xsl:value-of select="#Name"/>
</a>
</td>
I have created a Sharepoint list definition, and an instance of that definition. In the instance I need to store some HTML as the value of a field in my list instance. I know I can do this through the UI, but I need this list created on deployment. When I wrap my HTML value in CDATA tags, the item is simply not created. I get a deployment error if I Just have my HTML inline with my XML.
Elements.xml:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="ListName"
OnQuickLaunch="TRUE"
TemplateType="10051"
Url="Lists/ListName"
Description="List Description">
<Data>
<Rows>
<Row>
<Field Name="Title">My Title</Field>
<Field Name="Value">
<p>Some HTML HERE</p>
<table border="1"; cellpadding="10";>
<tr style="font-family:Arial; font-size:10pt;">
<th>header1</th>
<th> ... </th>
</tr>
<tr style="font-family:Arial; font-size:8pt;">
<td>Vaue1</td>
<td> ... </td>
</tr>
</table>
</Field>
</Row>
</Rows>
</Data>
</ListInstance>
</Elements>
Any help would be appreciated.
You need to HTML encode the value:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="ListName"
OnQuickLaunch="TRUE"
TemplateType="10051"
Url="Lists/ListName"
Description="List Description">
<Data>
<Rows>
<Row>
<Field Name="Title">My Title</Field>
<Field Name="Value">
<p>Some HTML HERE</p>
<table border="1"; cellpadding="10";>
<tr style="font-family:Arial; font-size:10pt;">
<th>header1</th>
<th> ... </th>
</tr>
<tr style="font-family:Arial; font-size:8pt;">
<td>Vaue1</td>
<td> ... </td>
</tr>
</table>
</Field>
</Row>
</Rows>
</Data>
</ListInstance>
</Elements>