Hum, I don't think that you create your map object the right way.<br>new OpenLayers.Map(options)<br><br>As
per OpenLayers, options should be given as second argument. The first
one is the id of the div you want to put the map into which isn't
required when you use a MapPanel.<br>
In your case, you'd better try with the following :<br><br>new OpenLayers.Map(null, options)<br><br>Regards,<br>Pierre<br><br><div class="gmail_quote">On Fri, Sep 11, 2009 at 4:55 PM, Luca Casagrande <span dir="ltr"><<a href="mailto:luca.casagrande@gmail.com">luca.casagrande@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hello folks,<br>
I have some troubles with GeoExt.MapPanel and Ext.TabPanel (the code<br>
is at the end of the message):<br>
- if I set as activeTab the one with the map, it doesn't load the<br>
overlay layers and firebug says:<br>
<br>
tile is undefined<br>
[Break on this error] tile.unload();\nGrid.js (riga 563)<br>
bottomLeftTile is undefined<br>
[Break on this error] bounds = new<br>
OpenLayers.Bounds(bottomLeftTile.bounds.left, \n<br>
<br>
- if I set as activeTab the other one, all is fine.<br>
Can this be related to DOM loading?<br>
<br>
Thanks<br>
Ciao<br>
Luca<br>
<br>
Code:<br>
var mapTab = new Ext.TabPanel({<br>
region: 'center',<br>
deferredRender: false,<br>
activeTab: 0,<br>
items: [{<br>
html: '<p>Test</p>',<br>
title:'Welcome!',<br>
closable: false,<br>
autoScroll: true<br>
},<br>
new GeoExt.MapPanel({<br>
title: ' Test',<br>
closable : false,<br>
map: new<br>
OpenLayers.Map(options),<br>
center: [lon, lat],<br>
zoom: 0,<br>
layers: [..]<br>
})]<br>
});<br>
</div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Pierre GIRAUD<br>Géomaticien, Analyste<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex <br><br>Tel : 00 33 4 79 44 44 93<br>Mail : <a href="mailto:pierre.giraud@camptocamp.com">pierre.giraud@camptocamp.com</a><br>
<a href="http://www.camptocamp.com">http://www.camptocamp.com</a> <br>