[Commits] r2776 - sandbox/gxm/geoext/gxm/lib/GXM/widgets
commits at geoext.org
commits at geoext.org
Sun Jul 24 01:25:37 CEST 2011
Author: marcjansen
Date: 2011-07-24 01:25:37 +0200 (Sun, 24 Jul 2011)
New Revision: 2776
Modified:
sandbox/gxm/geoext/gxm/lib/GXM/widgets/MapPanel.js
Log:
[gxm] API-docs improvements
Modified: sandbox/gxm/geoext/gxm/lib/GXM/widgets/MapPanel.js
===================================================================
--- sandbox/gxm/geoext/gxm/lib/GXM/widgets/MapPanel.js 2011-07-23 23:11:02 UTC (rev 2775)
+++ sandbox/gxm/geoext/gxm/lib/GXM/widgets/MapPanel.js 2011-07-23 23:25:37 UTC (rev 2776)
@@ -49,50 +49,96 @@
//TODO: rename to GXM.Map, since this is not a Panel
GXM.MapPanel = Ext.extend(Ext.Component, {
/** api: config[map]
+ *
* ``OpenLayers.Map or Object`` A configured map or a configuration object
* for the map constructor. A configured map will be available after
* construction through the :attr:`map` property.
*/
/** api: property[map]
- * ``OpenLayers.Map`` or ``Object`` A map or map configuration.
+ *
+ * ``OpenLayers.Map`` An OpenLayers-Map-instance.
*/
map: null,
/** api: config[layers]
- * ``GeoExt.data.LayerStore or GeoExt.data.GroupingStore or Array(OpenLayers.Layer)``
- * A store holding records. The layers provided here will be added to this
- * MapPanel's map when it is rendered.
+ *
+ * ``Array(OpenLayers.Layer)``
+ * The layers provided here will be added to this MapPanel's map.
*/
/** api: property[layers]
+ *
* :class:`GXM.data.LayerStore` A store containing gxm_layer-model
* instances.
*/
layers: null,
+ /** api: config[controls]
+ *
+ * ``Array(OpenLayers.Control)``
+ * The layers provided here will be added to this MapPanel's map.
+ */
+ controls: null,
+
/** api: config[center]
- * ``OpenLayers.LonLat or Array(Number)`` A location for the initial map
- * center. If an array is provided, the first two items should represent
- * x & y coordinates.
+ *
+ * ``OpenLayers.LonLat, Array(Number) or String`` A location for the
+ * initial map center. If an array is provided, the first two items should
+ * represent x & y coordinates. If a string is provided, it should consist
+ * of a x & y coordinate seperated by a comma.
*/
center: null,
+ /** api: config[zoom]
+ *
+ * ``Number`` An initial zoom level for the map.
+ */
+ zoom: null,
- zoom: null,
+ /** api: config[bounds]
+ *
+ * ``OpenLayers.Bounds or Array(Number)`` An initial extent for the map
+ * (used if center and zoom are not provided. If an array, the first four
+ * items should be minx, miny, maxx, maxy.
+ */
bounds: null,
+ // TODO we should be align this to GeoExt's extent, shouldn't we?
+
+ /** api: config[fullscreen]
+ *
+ * ``Boolean`` Shall this component be rendered to fill the full screen of
+ * the device? Defaults to ``true``.
+ */
//TODO: do we really wish to have this fullscreen?
//TODO: is this in any case a usefull default?
fullscreen: true,
+
+ /** private: property[monitorResize]
+ *
+ * ``Boolean`` Shall we monitor resize of the element we are rendered in?
+ * Defaults to ``true``.
+ */
// set monitorResize to true just as the original Map-component of
// Sencha Touch does (Review BvdE).
monitorResize: true,
+
+ /** private: method[getDefaultControls]
+ *
+ * ``Function`` Returns an array of OpenLayers.Control-instances to be used
+ * when no explicit controls were given.
+ */
getDefaultControls: function() {
return [
new OpenLayers.Control.TouchNavigation(),
new OpenLayers.Control.Attribution()
];
},
+
+ /** private: method[initComponent]
+ *
+ * ``Function`` Initializes the Component.
+ */
initComponent: function(){
// set scroll to false just as the original Map-component of
// Sencha Touch does (Review BvdE).
@@ -208,6 +254,7 @@
},
+
/** private: method[onMoveend]
*
* The "moveend" listener.
@@ -249,7 +296,8 @@
this.fireEvent("afterlayerremove");
},
- // @private
+ /** private: method[onRender]
+ */
onRender : function(container, position) {
// set setVisibilityMode to Ext.Element.OFFSETS just as the
// original Map-component of Sencha Touch does (Review BvdE).
@@ -257,6 +305,8 @@
this.el.setVisibilityMode(Ext.Element.OFFSETS);
},
+ /** private: method[afterRender]
+ */
afterRender: function(){
GXM.MapPanel.superclass.afterRender.apply(this, arguments);
var me = this;
@@ -275,6 +325,8 @@
}
},
+ /** private: method[afterRender]
+ */
renderMap: function(){
var me = this;
var map = me.map;
@@ -297,6 +349,9 @@
}
},
+
+ /** private: method[updateMapSize]
+ */
//TODO: check if we need this
updateMapSize: function() {
if(this.map) {
@@ -306,6 +361,7 @@
/** private: method[beforeDestroy]
+ *
* Private method called during the destroy sequence.
*/
beforeDestroy: function() {
More information about the Commits
mailing list