The tab widget size is set statically to 950x700 below.
How do I make it dynamic so that it's initial size and resize changes
as needed by the size of the Page box?
(By the way, this is a decent example of how to use OpenLayers Map
with Qooxdoo, using MapQuest's Open Tile servers.)
qx.Class.define("kiosk_portal.OpenLayersMap",
{
extend : qx.ui.core.Widget,
construct : function()
{
this.base(arguments);
this.set({
width: 950,
height: 700
});
this.addListenerOnce("appear", function() {
var arrayOSM =
["http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.jpg",
"http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.jpg",
"http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.jpg",
"http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.jpg"];
var baseOSM = new OpenLayers.Layer.OSM("MapQuest-OSM Tiles",
arrayOSM,
{attribution:
'<p>Tiles Courtesy of <a href="http://www.mapquest.com/"
target="_blank">MapQuest</a> <img
src="http://developer.mapquest.com/content/osm/mq_logo.png"></p>'}
);
var map = new OpenLayers.Map(
this.getContentElement().getDomElement(),
{controls: [
new
OpenLayers.Control.PanZoom(),
new
OpenLayers.Control.ScaleLine(),
new
OpenLayers.Control.Attribution(),
new
OpenLayers.Control.Navigation(
{mouseWheelOptions: {interval: 100}}
)
]
}
);
map.addLayer(baseOSM);
var wgs84 = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection("EPSG:900913");
map.setCenter(
new OpenLayers.LonLat(-98.4375,39.774769).transform(wgs84, mercator),
4
);
this.__map = map;
});
}
});
qx.Class.define("kiosk_portal.OpenLayersMapTab",
{
extend : qx.ui.tabview.Page,
members: {
getMap: function() {
return this.__map;
}
},
construct : function(label)
{
this.base(arguments, label);
this.setLayout(new qx.ui.layout.VBox());
this.__kioskContainer = new qx.ui.container.Composite();
var __layout = new qx.ui.layout.VBox();
__layout.setSpacing(4);
this.__kioskContainer.setLayout(__layout);
this.__map = new kiosk_portal.OpenLayersMap();
this.__kioskContainer.add(this.__map);
this.add(this.__kioskContainer);
this.setShowCloseButton(true);
}
});
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel