[mapguide-users] Can anyone tell me why I can't do a refresh

Kenneth, GEOGRAF A/S ks at geograf.dk
Fri Dec 14 17:02:17 EST 2007


Arh... my bad... it is of course: "Refresh()" :D

Regards, Kenneth, GEOGRAF A/S



Martin Morrison skrev:
> Refesh() or Refresh()????
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Kenneth,
> GEOGRAF A/S
> Sent: Friday, December 14, 2007 4:18 PM
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] Can anyone tell me why I can't do a
> refresh
>
> The frame hierachy problem aside, the function is called "Refesh()" not 
> "refresh()".
> Also, most frames have a function called "GetMapFrame()", that will ease
>
> the problem of finding the right frame.
>
> Regards, Kenneth, GEOGRAF A/S
>
>
>
> gom skrev:
>   
>> I have the following code in vb.net.  I get a javascript error when I
>>     
> try to
>   
>> do the refresh.  If I place an html button in the page and execute
>> parent.parent.mapFrame.refresh();  It refreshes the map with my group
>>     
> turned
>   
>> off.  For some reason, when I execute the sub as shown below,
>> parent.parent.mapFrame is not valid but parent.mapFrame is.  Same page
>>     
> as
>   
>> the html button but obviously executed differently.  The debugger
>>     
> shows that
>   
>> parent is viewFrame in this context and parent.mapFrame is valid.
>>     
> However,
>   
>> the refresh throws an error saying object or method does not exist.  I
>>     
> feel
>   
>> like I'm missing something obvious but cannot discover what it is.
>>     
> Anyone
>   
>> have any help.
>>
>> Thanks in advance.
>>
>> Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object,
>>     
> ByVal e As
>   
>> System.EventArgs)
>>         InitializeWebTier()
>>         Dim mySiteConnection As New MgSiteConnection
>>         Dim myUserInfo As New
>> MgUserInformation(Session.Item("sessionID").ToString)
>>         mySiteConnection.Open(myUserInfo)
>>         Dim myFeatureService As MgFeatureService =
>> mySiteConnection.CreateService(MgServiceType.FeatureService)
>>         Dim myResourceService As MgResourceService =
>> mySiteConnection.CreateService(MgServiceType.ResourceService)
>>         Dim myMap As New MgMap
>>         myMap.Open(myResourceService, m_CurrentMap())
>>         Dim myLayerGroup As MgLayerGroup = Nothing
>>         Dim myLayerGroups As MgLayerGroupCollection =
>>     
> myMap.GetLayerGroups
>   
>>         Dim i As Integer = 0
>>         For Each myLayerGroup In myLayerGroups
>>             If myLayerGroup.Name = "Group1" Then
>>                 myLayerGroup.SetVisible(False)
>>             End If
>>         Next
>>         myMap.Save()
>>         Dim myKey As String = "mapRefresh"
>>         If Not Page.ClientScript.IsStartupScriptRegistered(Me.GetType,
>> myKey) Then
>>             Dim myScript As String = "parent.mapFrame.refresh();"
>>             Page.ClientScript.RegisterStartupScript(Me.GetType, myKey,
>> myScript, True)
>>         End If
>> End Sub
>>
>>   
>>     
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071214/a42e34c8/attachment.html


More information about the mapguide-users mailing list