Hi,
I have develop a simple sp hosted app with a list and a field of type geolocation. Now I want to display an customized mapview (mapviewtemplate.js) on the default page of the app. I do this via an XSLTListview Webpart JSLink property. But it just not render on the page. Any idea's?
Regards,
Adem
Below the schema blok of the view and the element file of de pages module
inside schema xml
<View BaseViewID="2" Type="HTML" WebPartZoneID="Main" DisplayName="SPMAP" DefaultView="False" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/generic.png?rev=23" Url="mapview.aspx" Name="Mapview" ><Toolbar Type="Standard" /><XslLink Default="TRUE">main.xsl</XslLink><JSLink>mapviewtemplate.js</JSLink><RowLimit Paged="TRUE">30</RowLimit><ViewFields><FieldRef Name="Title"></FieldRef><FieldRef Name="Map_Location" /></ViewFields><Query><OrderBy><FieldRef Name="ID"></FieldRef></OrderBy></Query><ParameterBindings><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /></ParameterBindings></View>
inside element.xml
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><Module Name="Pages"><File Path="Pages\Default.aspx" Url="Pages/Default.aspx" ReplaceContent="TRUE" > <View WebPartZoneID="HomePage1" WebPartOrder="0" List="Lists/MapSettings" DefaultView="FALSE" BaseViewID="2" Hidden="TRUE">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="AllowConnect" type="bool">True</property>
<property name="ChromeType" type="chrometype">None</property>
<property name="Title" type="string">Promoted Links</property>
<property name="JSLink" type="string">~site/Scripts/SPMAPviewtemplate1.js</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</View></File></Module></Elements>
default.aspx
<%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%><%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %><%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%-- The markup and script in the following Content element will be placed in the <head> of the page --%><asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"><script type="text/javascript" src="../Scripts/jquery-1.9.1.min.js"></script><script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script><script type="text/javascript" src="/_layouts/15/sp.js"></script><meta name="WebPartPageExpansion" content="full" /><!-- Add your CSS styles to the following file --><link rel="Stylesheet" type="text/css" href="../Content/App.css" /><!-- Add your JavaScript to the following file --><script type="text/javascript" src="../Scripts/App.js"></script></asp:Content><%-- The markup in the following Content element will be placed in the TitleArea of the page --%><asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
The Map</asp:Content><%-- The markup and script in the following Content element will be placed in the <body> of the page --%><asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server"><WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly"
ID="HomePage1" Title="loc:full" /><%-- <div><p id="message"><!-- The following content will be replaced with the user name when you run the app - see App.js -->
initializing...</p></div>--%></asp:Content>