update panel Issue

Last post 4/3/2009 1:01:49 AM by Chris Pietschmann. 1 replies. << Back to Web.Maps.VE v2.0 General
4/1/2009 11:30:40 AM
Arul

update panel Issue

The below code is right?

<asp:UpdatePanel  ID="updatePanelmap" UpdateMode="Conditional" runat="server">
                 <ContentTemplate><td class="map" valign="top">
                    <Simplovation:Map runat="server" ID="Map1" Height="100%" Width="100%" AsyncPostbackPassShapes="false" OnFindLoaded="Map1_FindLoaded"/>
                    <MapExtenders:MiniMapExtender runat="server" ID="MiniMapExtender1" TargetControlID="Map1" HorizontalSide="Right" VerticalSide="Top" ></MapExtenders:MiniMapExtender>
                    <MapExtenders:TileLayerExtender runat="server" ID="TileLayerExtender1" TargetControlID="Map1" >
                    </MapExtenders:TileLayerExtender></td>
                </ContentTemplate>
           </asp:UpdatePanel>


The same code was not working properly and thrown error in the VE.2.0.1. But when I use VE.2.0.3, It is working fine.

Also If I remove the update panel and dynamically add tiles from code behind, the map is not adding the tiles properly.
4/3/2009 1:01:49 AM
Chris Pietschmann

Re:update panel Issue

Because of the ajax nature of the Map control it is not to be used within an UpdatePanel. You really don't want to be reinstantiating the JavaScript Virtual Earth Map EVERY time you need to change/modify anything via an asynchronous postback. Also, the Map control uses an UpdatePanel internally to power it's Asynchronous Postback model of allowing you to handle client-side VE events from server-side .NET code.

Currently, you can only set the Extender control properties on the initial page load. They currently do not support modifying their properties during Asynchronous Postbacks. This goes for all the Extender controls that are part of the Web.Maps.VE library.

I am also working on writing up nice tutorials on using the Web.Maps.VE control and its Extender controls. There are already a couple tutorials posted on our blog (http://blog.simplovation.com), and I am working to add more soon.

Since you are using the MiniMapExtender I recommend you take a look at the MiniMapExtender Tutorial. It contains a description of how to easily manipulate the display of the Mini Map using JavaScript once it has already been loaded on the page.

At the below link is a list of all the Tutorials currently posted on our blog:
http://blog.simplovation.com/blog/archive.aspx#Tutorials