This is a migrated thread and some comments may be shown as answers.

RadAjaxPanel and GoogleMaps?

9 Answers 159 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 14 Mar 2009, 08:09 PM
Would anyone happen to know how to correctly show and hide a google map inside a RadAjaxPanel?  I've tried responseEnd and other techniques found through searching the forum with no luck. 

I'm using the open source Google Map control...



Help on this would be very much appreciated!  


Thanks,
Stephen

9 Answers, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 17 Mar 2009, 04:25 AM
Ok, I've tried multiple open source or trial versions of Google Map server controls all with no success.  I would REALLY appreciate some assistance on this.  I've already tried the following, all of which either disappear or throws an error of "Access is Denied"

The one in my previous post


Again, any help would be greatly appreciated on this!


Thanks,
Stephen
0
Iana Tsolova
Telerik team
answered on 17 Mar 2009, 11:37 AM
Hi Stephen,

Could you please elaborate a bit on your scenario? How exactly the RadAjaxPanel and GoogleMap control are configured and how is it supposed to work?
Sending as a sample page might be of great help.

Greetings,
Iana
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Stephen
Top achievements
Rank 1
answered on 17 Mar 2009, 05:11 PM
For this test I used to "Reimers" Google Map control (http://www.reimers.dk/) with the RadAjaxPanel.  I've placed a button and this control inside the panel and marked the Google Map as Visible="False"  Clicking the enable button should then make it visible.  Please take a look at the code below...

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestMap.aspx.cs" Inherits="bnh.Web.TestMap" %> 
 
<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map" TagPrefix="Reimers" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<!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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ScriptManager id="scriptManager" runat="server"></asp:ScriptManager>   
        <telerik:RadAjaxManager ID="radManager" runat="server"></telerik:RadAjaxManager> 
          
        <telerik:RadAjaxPanel ID="radPanel" runat="server">  
            <asp:Button ID="enable" runat="server" OnClick="enable_Click" Text="Enable" /> 
 
            <Reimers:GoogleMap ID="GoogleMap1" runat="server"   
            GoogleKey="<Your Google Key Here>"   
                Width="500px" Height="500px" Visible="false">  
            </Reimers:GoogleMap> 
        </telerik:RadAjaxPanel> 
    </div> 
    </form> 
</body> 
</html> 
 
0
Stephen
Top achievements
Rank 1
answered on 18 Mar 2009, 09:15 PM
Telerik Team,

Any updates on this yet?
0
Iana Tsolova
Telerik team
answered on 19 Mar 2009, 03:41 PM
Hello Stephen,

I tested your code and it worked ok for me in FF. In IE - the control could not display at all, even with ajax disabled. Please try the attached sample and let me know how it works on your end and if I missed something out.

Regards,
Iana
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Stephen
Top achievements
Rank 1
answered on 19 Mar 2009, 03:52 PM

Iana,

If you take the button and google map control out of the RadAjaxPanel it works just fine in IE. It doesn't work at all under the Panel as you've noticed.

 

Also, it's not this specific control I'm trying to get working.  I'm trying to get any google map server control to work under the RadAjaxPanel.  Every map control I've found fails to either show or throws an error under the RadAjaxPanel.


Thanks,
Stephen

0
Iana Tsolova
Telerik team
answered on 20 Mar 2009, 03:35 PM
Hello Stephen,

I tried your suggestion to put the map control outside the RadAjaxPanel, I still cannot make it work in IE.
However, could you please try ajaxifying the Google map controls with ASP:UpdatePanel instead of RadAjax and let me know how it goes?

Regards,
Iana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Stephen
Top achievements
Rank 1
answered on 21 Mar 2009, 02:11 AM

Hi Iana,

I tried the UpdatePanel as you suggested, you are right, it doesn't work in an UpdatePanel either.  Does this mean there is no way to use this within an RadAjaxPanel? 

What I mean is... Is there some way to have the GoogleMap Control within an RadAjaxPanel do a complete reload/refresh?  I'm not looking to refresh parts of this control, just be able to refresh the whole map control each time ajax request of the  parent RadAjaxPanel is required?

 

Alternatively I've also found I could work around this by nesting the control within another page and use an iframe.  If I do this, I need someway to show a LoadingAjaxPanel while the iframe is refreshed/reloaded.  Is there someway to do this with an iframe (I have another post on this) ?

 

 

Thanks,

Stephen

0
Iana Tsolova
Telerik team
answered on 23 Mar 2009, 12:44 PM
Hello Stephen,

Indeed, if the GoogleMap control did not work with MS:UpdatePanel, then it could hardly be used with RadAjax as well. I suggest that you check up if the control is compatible with AJAX at all.
And unfortunately iFrames could not be ajaxified so this is not the alternative you can use.

All that I can think of is to try handling some of the GoogleMap control client-side events and there explicitly to show/hide the RadAjaxLoadingPanel.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or