[Commits] r919 - core/trunk/geoext/lib/GeoExt/data
commits at geoext.org
commits at geoext.org
Fri May 29 23:25:08 CEST 2009
Author: tschaub
Date: 2009-05-29 23:25:08 +0200 (Fri, 29 May 2009)
New Revision: 919
Modified:
core/trunk/geoext/lib/GeoExt/data/ScaleStore.js
Log:
Docs for ScaleStore.
Modified: core/trunk/geoext/lib/GeoExt/data/ScaleStore.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/data/ScaleStore.js 2009-05-29 21:14:34 UTC (rev 918)
+++ core/trunk/geoext/lib/GeoExt/data/ScaleStore.js 2009-05-29 21:25:08 UTC (rev 919)
@@ -5,6 +5,11 @@
*
* ¹ pending approval */
+/** api: (define)
+ * module = GeoExt.data
+ * class = ScaleStore
+ * base_link = `Ext.data.DataStore <http://extjs.com/deploy/dev/docs/?class=Ext.data.DataStore>`_
+ */
Ext.namespace("GeoExt.data");
/**
@@ -15,19 +20,30 @@
* scale - the scale denominator for the zoom level
* resolution - the map resolution when the zoom level is active.
*/
+/** api: constructor
+ * .. class:: ScaleStore
+ *
+ * A store that contains a cache of available zoom levels. The store can
+ * optionally be kept synchronized with an ``OpenLayers.Map`` or
+ * :class:`GeoExt.MapPanel` object.
+ *
+ * Records have the following fields:
+ *
+ * * zoom - ``Number`` The zoom level.
+ * * scale - ``Number`` The scale denominator.
+ * * resolution - ``Number`` The map units per pixel.
+ */
GeoExt.data.ScaleStore = Ext.extend(Ext.data.Store, {
- /**
- * Property: map
- * The OpenLayers.Map instance to which the store is bound, if any.
+
+ /** api: config[map]
+ * ``OpenLayers.Map`` or :class:`GeoExt.MapPanel`
+ * Optional map or map panel from which to derive scale values.
*/
map: null,
- /**
- * Constructor: GeoExt.data.ScaleStore
- * Construct a ScaleStore from a configuration. The ScaleStore accepts some custom parameters
- * addition to the fields accepted by Ext.Store.
- * Additional options:
- * map - the GeoExt.MapPanel or OpenLayers.Map instance the store should stay sync'ed with
+ /** private: method[constructor]
+ * Construct a ScaleStore from a configuration. The ScaleStore accepts
+ * some custom parameters addition to the fields accepted by Ext.Store.
*/
constructor: function(config) {
var map = (config.map instanceof GeoExt.MapPanel ? config.map.map : config.map);
@@ -43,15 +59,14 @@
if (map) this.bind(map);
},
- /**
- * APIMethod: bind
- * Bind this store to a map; that is, maintain the zoom list in sync with the map's current
- * configuration. If the map does not currently have a set scale list, then the store will
- * remain empty until the map is configured with one.
- *
- * Parameters:
- * map - the GeoExt.MapPanel or OpenLayers.Map to which we should bind
- * options - additional parameters for the bind operation (optional, currently unused)
+ /** api: method[bind]
+ * :param map: :class`GeoExt.MapPanel` or ``OpenLayers.Map`` Panel or map
+ * to which we should bind.
+ *
+ * Bind this store to a map; that is, maintain the zoom list in sync with
+ * the map's current configuration. If the map does not currently have a
+ * set scale list, then the store will remain empty until the map is
+ * configured with one.
*/
bind: function(map, options) {
this.map = (map instanceof GeoExt.MapPanel ? map.map : map);
@@ -63,10 +78,10 @@
}
},
- /**
- * APIMethod: unbind
- * Un-bind this store from the map to which it is currently bound. The currently stored zoom
- * levels will remain, but no further changes from the map will affect it.
+ /** api: method[unbind]
+ * Un-bind this store from the map to which it is currently bound. The
+ * currently stored zoom levels will remain, but no further changes from
+ * the map will affect it.
*/
unbind: function() {
if (this.map) {
@@ -76,13 +91,12 @@
}
},
- /**
- * Method: populateOnAdd
- * This method handles the case where we have bind() called on a not-fully-configured map so
- * that the zoom levels can be detected when a baselayer is finally added.
- *
- * Parameters:
- * evt - the OpenLayers event
+ /** private: method[populateOnAdd]
+ * :param evt: ``Object``
+ *
+ * This method handles the case where we have bind() called on a
+ * not-fully-configured map so that the zoom levels can be detected when a
+ * baselayer is finally added.
*/
populateOnAdd: function(evt) {
if (evt.layer.isBaseLayer) {
@@ -91,10 +105,9 @@
}
},
- /**
- * Method: populateFromMap
- * This method actually loads the zoom level information from the OpenLayers.Map and converts
- * it to Ext Records.
+ /** private: method[populateFromMap]
+ * This method actually loads the zoom level information from the
+ * OpenLayers.Map and converts it to Ext Records.
*/
populateFromMap: function() {
var zooms = [];
More information about the Commits
mailing list