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

Blank map when i use MasterPage

9 Answers 141 Views
Map
This is a migrated thread and some comments may be shown as answers.
Naografix
Top achievements
Rank 1
Naografix asked on 27 Jan 2015, 10:13 AM
Hey,

I have a problem with my radmap. In fact, when i use my MasterPage, my radmap becomes white (i havent Layers...)

Look my code :

DEFAULT.ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" MasterPageFile="~/SITE CG/CG71/MasterPage.Master" Inherits="Portail_Eau.Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/UserControl/UserImpInfo.ascx" TagPrefix="uc1" TagName="UserImpInfo" %>
<%@ Register Src="~/UserControl/UserCaracStation.ascx" TagPrefix="uc1" TagName="UserCaracStation" %>
<%@ Register Src="~/UserControl/UserFonctioStation.ascx" TagPrefix="uc1" TagName="UserFonctioStation" %>
<%@ Register Src="~/UserControl/UserGestionDoc.ascx" TagPrefix="uc1" TagName="UserGestionDoc" %>
<%@ Register Src="~/UserControl/UserERROR.ascx" TagPrefix="uc1" TagName="UserERROR" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
    <script src="Content/Scripts.js"></script>
    <link href="Content/DefaultStyles.css" rel="stylesheet" />
 
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
 
        
            <telerik:RadMap ID="RadMap1" runat="server" MinZoom="9" OnItemDataBound="RadMap1_ItemDataBound" CssClass="MyRadMap">
                <DataBindings>
                    <MarkerBinding DataShapeField="Shape" DataTitleField="nomStation" DataLocationLatitudeField="latitude" DataLocationLongitudeField="longitude" />
                </DataBindings>
                <LayersCollection>
                    <telerik:MapLayer Subdomains="a,b,c" Type="Tile" UrlTemplate="http://#= subdomain #.tile.thunderforest.com/outdoors/#= zoom #/#= x #/#= y #.png"></telerik:MapLayer>
                </LayersCollection>
            </telerik:RadMap>
 
             
    </form>
 
</asp:Content>


And my MasterPage :
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="Portail_Eau.SITE_CG.CG71.MasterPage" %>
 
<!doctype html>
 
<html lang="fr" class="no-js">
<head runat="server">
 
    <title>Département de Saône-et-Loire-Très haut débit</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link href="../../SITE CG/CG71/styles/style.css" rel="stylesheet" type="text/css" />
     
    <link rel="icon" type="image/gif" href="http://www.cg71.fr/typo3conf/ext/e_tca_extented/res/cg71/images/favicon.ico" />
    <link href="../../SITE CG/CG71/typo3conf/ext/e_googlemap/pi1/infobulle.css" rel="stylesheet" type="text/css" />
 
</head>
<body>
   
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
         
        </asp:ContentPlaceHolder>
    
 
</body>
 
</html>



This is my result :

http://puu.sh/f5OX7/27239a7d9a.jpg


Hum, wierd !

9 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 29 Jan 2015, 07:30 AM
Hello,

I tried the same scenario on my end, but to no avail. You can examine the attached page and compare it with the one built on your end.

Note that the Tile layer consists of images only, and this images are requested from the service used for the Tile layer. Therefore, you can firstly examine if there are any issues with the image requests. You can use the the browser's Net tab to investigate that. Subsequently, if requests are OK, investigate the DOM elements in the layer and the CSS rules that affect them (via the browser's HTML inspector). Make sure that no custom, or third-party CSS targets the images inside the map.  

If there are any further details with which I could be able to reproduce this on my end, please provide them.

Regards,
Ianko
Telerik
0
Richard
Top achievements
Rank 1
answered on 03 Feb 2015, 07:25 PM
I have ran into this same issue.  When using a MasterPage, the map tile does not display.  There is nothing but a white background as in Naografix's initial post.  I placed the map control in a webform without a master page and the tile displays as expected.  Were you able to resolve?
0
Ianko
Telerik team
answered on 04 Feb 2015, 09:00 AM
Hi Richard,

Did you try the sent sample? Are you able to reproduce the same with it? Can you provide a locally runnable sample, with which to reproduce the same on my end?

At this point, I am unable to recreate the same behavior, and due to that I can only guess what might be the reason for the faulty behavior.

Regards,
Ianko
Telerik
0
peter
Top achievements
Rank 1
answered on 16 Mar 2015, 05:02 PM
Have you guys resolved this, I am having the same problem.

w/r
Peter     
0
peter
Top achievements
Rank 1
answered on 16 Mar 2015, 05:04 PM
I should add that my script manager is on my master page, not on my content page.      
0
peter
Top achievements
Rank 1
answered on 16 Mar 2015, 05:33 PM
The problem is not from Master Pages, it is from bootstrap.     
0
Ianko
Telerik team
answered on 17 Mar 2015, 07:51 AM
Hi Peter,

Using the Bootstrap styles is a lead to what the issues is. The CSS styles added from Bootstrap implement CSS resets. One of them sets max-width to 100% to all images, which causes the Tile images of the map not to show.

To resolve this, add a CSS fix for all images inside RadMap:

.RadMap img{
    max-width:none;
}


Regards,
Ianko
Telerik
0
Paulius
Top achievements
Rank 2
answered on 04 Sep 2015, 10:11 AM

Hello,

I have the same problem, but only when my app is in https mode. In http it works fine.

Cheers

Paulius

0
Ianko
Telerik team
answered on 04 Sep 2015, 01:19 PM
Hello Paulius,

There is support ticked opened by you that treats that matter. Please examine my answer there. I suggest you continuing the conversation there.

As for anyone interested in the matter with SSL, the issue is not reproducible. It is most likely this to be related to IIS settings and requests handling in SSL-enabled application.  

Regards,
Ianko
Telerik
Tags
Map
Asked by
Naografix
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Richard
Top achievements
Rank 1
peter
Top achievements
Rank 1
Paulius
Top achievements
Rank 2
Share this question
or