|
Hi Chris
No I'm not using the control inside an update panel, so code from page is here.
<% @ Page Language="VB" AutoEventWireup="false" CodeFile="ve-live.aspx.vb" Inherits="_Default" %>
<% @ Register assembly="Simplovation.Web.Maps.VE" namespace="Simplovation.Web.Maps.VE" tagprefix="Simplovation" %>
<! 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 runat="server">
<title>Mapping</title>
</ head>
< script type="text/javascript">
// This method is run once the map has completed loading on the page
function mapLoaded()
{
var map = $find("<%=ve_map1.ClientID%>");
//This code will center the map on all the shapes that are plotted
var locations = new Array();
for(var a = 0; a < map.get_Map().GetShapeLayerCount(); a++)
{
for(var b = 0; b < map.get_Map().GetShapeLayerByIndex(a).GetShapeCount(); b++)
{
Array.addRange(locations, map.get_Map().GetShapeLayerByIndex(a).GetShapeByIndex(b).GetPoints());
}
}
if (locations.length != 0)
map.get_Map().SetMapView(locations);
}
</ script>
< body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="6000">
<% -- <Scripts>
<asp:ScriptReference path="~/PageRequestManagerEx.js"/>
</Scripts>-- %>
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
<div id="divMapContainer" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;">
<Simplovation:Map OnClientMapLoaded="mapLoaded" ID="ve_map1" runat="server" Width="100%" Height="100%"
DashboardSize="Small"
OnChangeView="ve_map1_ChangeView" Latitude="54.62864" Longitude="-2.967205"
Zoom="6">
</Simplovation:Map>
</div>
</form>
</ body>
</ html>
Thanks
|