I am populating a simple marker overlay via a timer in an update panel. However, the markers are not refreshing on the client side. I found a post which says to use mapControl.GetMapParser().sendMarkersRequest(); although I get a Javascript exception when doing this. Below is the code from my page. If I force a redraw then the markers show up on the page. Anybody have any idea what I am missing here? My other layers from the javscript method updateVehicles are updating fine.
Thanks
Curtis
<%@ Page Title="" Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="LiveMap.aspx.cs" Inherits="LiveMap" %>
<%@ Register Assembly="WebEdition" Namespace="ThinkGeo.MapSuite.WebEdition" TagPrefix="cc1" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="Telerik.OpenAccess, Version=2009.3.1119.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" namespace="Telerik.OpenAccess" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>EPIC Works - Live Map</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
[script removed]
var olMap;
document.body.onresize = pageSizeChanged;
function OnMapCreated(map) {
olMap = map;
pageSizeChanged();
}
function updateVehicles() {
var vehicleOverlay = olMap.getLayer("vehiclesOverlay");
vehicleOverlay.redraw(true);
mapControl.GetMapParser().sendMarkersRequest();
}
function pageSizeChanged() {
var scrollHeight = parseInt((self.innerHeight || (document.documentElement.clientHeight || document.body.clientHeight)));
var pageContainer = document.getElementById("pageContainer");
var newHeight = (scrollHeight - 26) + 'px';
pageContainer.style.height = newHeight;
}
[script removed]
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Skin="Windows7">
<telerik:RadPane ID="LeftPane" runat="server" Width="22px" Scrolling="none" Height="100%">
<telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22px">
<telerik:RadSlidingPane ID="RadSlidingPane1" Title="Truck Configuration" runat="server" Width="200px" CssClass="radSlidingPane">
[script removed]
<DataBindings>
<telerik:RadTreeNodeBinding Expanded="true" />
</telerik:RadTreeView>
</telerik:RadSlidingPane>
<telerik:RadSlidingPane ID="Radslidingpane2" Title="Selected Point Data" runat="server" Width="330px" CssClass="radSlidingPane">
<telerik:RadGrid ID="pointDataGrid" runat="server" AutoGenerateColumns="False"
GridLines="None" Height="400px" Width="300px">
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
<Columns>
<telerik:GridBoundColumn HeaderText="Parameter" ReadOnly="True"
UniqueName="parameter" DataField="Key">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Value" ReadOnly="True" UniqueName="value" DataField="Value">
</telerik:GridBoundColumn>
</telerik:RadGrid>
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
<telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar>
<telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None" Height="100%">
[script removed]
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
[script removed]
</asp:Timer>
</asp:UpdatePanel>
</telerik:RadPane>
</telerik:RadSplitter>
</asp:Content>