EasyUI Forum
May 15, 2024, 09:01:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: JEasyui 1.4 Layout Bug  (Read 10956 times)
BinaryCode
Newbie
*
Posts: 38


View Profile
« on: August 18, 2014, 08:48:11 PM »

Hello,

I try jeasyui 1.4 layout to show google map, problem is from resize to maximized, map not show all,

I have try with this solution:

$(window).resize(function(e) {
        var panel=$("#mainLayout").layout('panel','center');
        if(panel !==undefined){
            panel.doLayout();
        }
       
        google.maps.event.trigger(M.map, "resize");

    });

But not give me solution

Regards
BC,
« Last Edit: August 18, 2014, 08:56:31 PM by BinaryCode » Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: August 19, 2014, 12:25:26 AM »

Please show some html code to describe how you define the google map in a layout panel.
Logged
BinaryCode
Newbie
*
Posts: 38


View Profile
« Reply #2 on: August 19, 2014, 01:25:13 PM »

<body class="easyui-layout">
    <div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div>
    <div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
    <div data-options="region:'east',title:'East',split:true" style="width:100px;"></div>
    <div data-options="region:'west',title:'West',split:true" style="width:100px;"></div>
    <div id='map_canvas' data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</body>

M.init_map = function() {
    var mapOptions = {
        zoom: 5,
        center: new google.maps.LatLng(-0.789275, 113.921327),
        panControl: true,
        zoomControl: true,
        scaleControl: true,
        streetViewControl: false,
        overviewMapControl: false,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        mapTypeControlOptions: {
            mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.HYBRID, 'Bing Street', 'Bing Hybrid', 'Nokia Street']
        }
    };
    M.geocoder = new google.maps.Geocoder();
    M.map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
    M.map.mapTypes.set('Bing Street', bingMapType);
    M.map.mapTypes.set('Bing Hybrid', bingMapHybridType);
    M.map.mapTypes.set('Nokia Street', nokiaMapType);
};
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #3 on: August 19, 2014, 04:55:07 PM »

Please try to run the attached example 'test2.html'.
Logged
BinaryCode
Newbie
*
Posts: 38


View Profile
« Reply #4 on: August 19, 2014, 05:38:47 PM »

Hello Jarry,

I have run your sample, but have same problem:

please check link below:

First time (Full Size)
http://i58.tinypic.com/25ge1zm.png

Resize to small
http://i57.tinypic.com/11i1f03.png

Back to Full Size (Problem)
http://i62.tinypic.com/2w4ji92.png
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #5 on: August 19, 2014, 06:38:48 PM »

Please visit this example http://jsfiddle.net/94hqaaom/
Logged
BinaryCode
Newbie
*
Posts: 38


View Profile
« Reply #6 on: August 20, 2014, 01:44:10 AM »

Hello Jarry,

I have test your link, i have same problem, please klik restore down button, then klik maximize button, you will know different
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!