RadAjaxPanel and GoogleMaps?

10 posts, 0 answers
  1. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 14 Mar 2009 Link to this post

    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
  2. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 16 Mar 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 17 Mar 2009 Link to this post

    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.
  5. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 17 Mar 2009 Link to this post

    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> 
     
  6. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 18 Mar 2009 Link to this post

    Telerik Team,

    Any updates on this yet?
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 19 Mar 2009 Link to this post

    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.
  8. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 19 Mar 2009 Link to this post

    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

  9. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 20 Mar 2009 Link to this post

    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.
  10. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 20 Mar 2009 Link to this post

    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

  11. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 23 Mar 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017