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

RadWindow and OpenLayers Map

2 Answers 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 07 Feb 2014, 10:11 AM
Hello, I experience incorrect window resize when window placed on top of OpenLayers map. The issue appears with OpenLayers 2.13, in 2.12 it works as expected.

Here's sample code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
  CodeBehind="WebForm2.aspx.cs" Inherits="WebGisGeo.WebForm2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  <script type="text/javascript" src="http://www.openlayers.org/dev/OpenLayers.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <div id="map" style="width: 800px; height: 800px">
  </div>
  <telerik:RadWindow ID="_wndAttributeEditor" runat="Server" Title="Attribute Editor"
    Width="400" Height="550" VisibleOnPageLoad="false" Behaviors="Move, Resize, Maximize"
    Left="20" Top="170" EnableShadow="true">
    <ContentTemplate>
      <div id="_dvEditorWindowContent">
      </div>
    </ContentTemplate>
  </telerik:RadWindow>
  <input type="button" value="show" onclick="showwnd(); return false;" />
  <script type="text/javascript">
    function showwnd() {
      var editorWindow = $find("<%=_wndAttributeEditor.ClientID%>");
      editorWindow.show();
    }
    function init() {
      map = new OpenLayers.Map({
        div: "map",
        allOverlays: true,
        maxExtent: new OpenLayers.Bounds(1549471.9221, 6403610.94, 1550001.32545, 6404015.8)
      });
    }
  </script>
</asp:Content>

Any help appreciated, thanks in advance!

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Feb 2014, 04:07 PM
Hello Andreas,

I would advise that you examine the changelog of the OpenLayers map, because this is most likely an issue with event bubbling. Then the user resizes the RadWindow we need the mouse event, so the RadWindow scripts can resize the control. If the map consumes the event RadWindow will not be notified about it.
A quick search on the net seems to indicate that the fallThrough property now defaults to false, so mouse and keyboard events do not bubble anymore, so you may want to set it to true explicitly: https://github.com/openlayers/openlayers/blob/master/notes/2.13.md.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Andreas
Top achievements
Rank 1
answered on 10 Feb 2014, 08:08 AM
problem solved, thank you very mach!
Tags
Window
Asked by
Andreas
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Andreas
Top achievements
Rank 1
Share this question
or