prototypejs - Getting trouble with jQuery tabs in loading openlayers map -
i've 4 jquery tabs
, in second tab i'm showing map
using openlayers library
i'm getting following errors
uncaught typeerror: cannot call method 'clone' of null // onload error uncaught typeerror: cannot read property 'w' of null // getting error when zooming-in , out
i thought code went wrong in initializing openlayers map object
or somewhere
,but trouble jquery tabs
. if i'm placing map div
in first tab showing map
expected.
i tried this not solved issue when placing map div
in second tab.
update below content:
if write jquery tabs
code after map object
creation working fine in chrome
map destructing in firefox
.
how can call initialize jquery tabs
after execution of user defined function?
you can initialize map when enter tab
.
create tabs this:
$( "#tabs" ).tabs({ activate: function(event ,ui){ if(ui.newtab.index() == 1)// tab number start 0 { init(); // map initial function } } });
and define init()
this:
var map; //global variable function init() { if(map) //for create 1 map { return false; // if map exists return , not create map } ... ... }
Comments
Post a Comment