This project is read-only.

update panel in asp.net 4

Aug 28, 2010 at 11:16 AM

I have downloaded the 5.0 alpha (set googlemap-64327) and successfuly compiled with vs 2010.

I need to use it inside an update panel and use the OnDragEnd / OnZoomEnd events to display appropriate markers server side based on zoom/bound.

Using asp.net 4.0 i'm getting javascript error event with empty server side code.

Putting this code in an empty page I get a jscript exception:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div align="center">
                <artem:GoogleMap BorderStyle="Solid" BorderColor="Beige" BorderWidth="3" ID="GoogleMap1"
                    EnableContinuousZoom="False" EnableGoogleBar="true" runat="server" Width="900px"
                    Height="800px" Key=""
                    Latitude="42.1229" Longitude="24.7879" Zoom="6" EnableScrollWheelZoom="true"
                    ShowScaleControl="True" ZoomPanType="Large3D" RenderMode="Ajax" OnDragEnd="GoogleMap1_DragEnd"
                    OnZoomEnd="GoogleMap1_ZoomEnd">
                </artem:GoogleMap>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

Error: Sys.ArgumentTypeException: Object of type 'Object' cannot be converted in the type 'Artem.Google.Events.ZoomEventArgs' (my translation).
Nome parametro: instance

inside function Type$initializeBase in

// Name: MicrosoftAjax.debug.js

// Assembly: System.Web.Extensions

// Version: 4.0.0.0

// FileVersion: 4.0.30319.1

 

Can someone give me a hint ? There is a way to use the control in asp.net 4.0 ?

Best regards,

LP

Mar 9, 2011 at 12:32 AM

Try setting the property:

InsideUpdatePanel="True"

May 7, 2012 at 12:30 AM

First, congrats for this project, is excellent.

I'm trying to reposition Google map Markers, but I still couldn't. 

I've inserted InsertionUpdatePanel but after the Timer Tick, all map was refreshed.

code fragments:

default.aspx:

 

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <artem:GoogleMap ID="GoogleMap1" runat="server" EnableScrollWheelZoom="true" InsideUpdatePanel="true"
                    width="100%" EnableMarkerManager="false" DisableDefaultUI="true">
                </artem:GoogleMap>


                <asp:Timer 
                    ID="refreshTimer" 
                    runat="server"
                    Interval="10000" 
                    ontick="refreshTimer_Tick"
                    Enabled ="true" EnableViewState="True">
                </asp:Timer>

            </ContentTemplate>
        </asp:UpdatePanel>
    

default.aspx.cs:

 protected void refreshTimer_Tick(object sender, EventArgs e)
    {
        GoogleMap1.Markers[0].Position.Latitude = -16.45112;
        GoogleMap1.Markers[0].Position.Longitude = -39.06467;
    }
 

 

thanks.