Render Esri Map in Sencha-Touch -
Render Esri Map in Sencha-Touch -
i've got problem render esri map sencha touch. display tabpanel tab containing map, , 3 other tabs.
problem when i'm on tab map-tab, when resize window (or alter orientation of phone), map diseapears.
identified source of problem. when resize window beingness on tab, map tab goes current size 0x0 new size. problem when width , height set 0x0, esri map require tiles of dimension 0x0, , error appears.
tried set minwidth , minheight tab without success.
have clue how prepare ??
give thanks in advance !
i believe had same problem (i didn't know exact cause @ time). whenever orientation of screen changed manually changing dimensions of esri map match panel , firing map's reposition , resize methods. however, if fired different panel, basemaps drop out of map.
i able prepare calling next function every time orientation changed, or map panel set active:
function resizemapdiv(){ if (apppanel.getactiveitem() === mappanel){ var mapdiv = document.getelementbyid('mapdiv'); var mappanel = document.getelementbyid('mappanel'); if ((mapdiv != null) && (mappanel != null) && (mapdiv.style.width != mappanel.style.width)){ mapdiv.style.width = mappanel.style.width; mapdiv.style.height = mappanel.style.height; map.reposition(); map.resize(); } } } sencha-touch esri
Comments
Post a Comment