From 8aba4f0f4fc439e9e8decba17ff21e3c62539986 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 22 Apr 2009 17:55:10 +0000 Subject: [PATCH] Adding initial doc sources. --- Makefile | 88 ++++++++++++++ _static/favicon.ico | Bin 0 -> 1150 bytes conf.py | 194 ++++++++++++++++++++++++++++++ index.rst | 72 +++++++++++ lib.rst | 28 +++++ lib/GeoExt.rst | 11 ++ lib/GeoExt/data.rst | 14 +++ lib/GeoExt/data/FeatureReader.rst | 49 ++++++++ lib/GeoExt/data/FeatureRecord.rst | 20 +++ lib/GeoExt/data/FeatureStore.rst | 61 ++++++++++ lib/GeoExt/data/LayerReader.rst | 29 +++++ lib/GeoExt/data/LayerRecord.rst | 20 +++ lib/GeoExt/data/LayerStore.rst | 55 +++++++++ lib/GeoExt/data/ProtocolProxy.rst | 53 ++++++++ lib/GeoExt/widgets.rst | 10 ++ lib/GeoExt/widgets/MapPanel.rst | 95 +++++++++++++++ lib/GeoExt/widgets/Popup.rst | 67 +++++++++++ lib/template_rst.txt | 83 +++++++++++++ 18 files changed, 949 insertions(+) create mode 100644 Makefile create mode 100644 _static/favicon.ico create mode 100644 conf.py create mode 100644 index.rst create mode 100644 lib.rst create mode 100644 lib/GeoExt.rst create mode 100644 lib/GeoExt/data.rst create mode 100644 lib/GeoExt/data/FeatureReader.rst create mode 100644 lib/GeoExt/data/FeatureRecord.rst create mode 100644 lib/GeoExt/data/FeatureStore.rst create mode 100644 lib/GeoExt/data/LayerReader.rst create mode 100644 lib/GeoExt/data/LayerRecord.rst create mode 100644 lib/GeoExt/data/LayerStore.rst create mode 100644 lib/GeoExt/data/ProtocolProxy.rst create mode 100644 lib/GeoExt/widgets.rst create mode 100644 lib/GeoExt/widgets/MapPanel.rst create mode 100644 lib/GeoExt/widgets/Popup.rst create mode 100644 lib/template_rst.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8c183bd --- /dev/null +++ b/Makefile @@ -0,0 +1,88 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf _build/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html + @echo + @echo "Build finished. The HTML pages are in _build/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml + @echo + @echo "Build finished. The HTML pages are in _build/dirhtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in _build/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in _build/qthelp, like this:" + @echo "# qcollectiongenerator _build/qthelp/GeoExt.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile _build/qthelp/GeoExt.qhc" + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + @echo + @echo "Build finished; the LaTeX files are in _build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes + @echo + @echo "The overview file is in _build/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in _build/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in _build/doctest/output.txt." diff --git a/_static/favicon.ico b/_static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..08575c4591656848013b43cae5399e49be2f8d62 GIT binary patch literal 1150 zcmai!dq`7J9LJCJ9$}9^r2fk2kBa)M5F=2w5&fO69aX|w{wdXj2`!L?&17?zt8V=&bfqy(Rc1# zLcfvZ_*6n72qDYppdu>yDW?-5R2TXHAfY2LK03qSbSBUKY>B_ek=onmNG%MEjYvZ6 z{pNFq419h6^;Ob*BG}H!#Wi1Mn5hzeaqDe0mCPI9OaXpk} ziwOkPN(i+w^z|s=?z{$9R{;!-`_MgLLymp}GPTjL88$Ws^9YQONPGqs zspdneSq$H61&sE?X!bsUtKWi_eul<&;vkcNIQ~53G=~>W$)#fdKKo64t7$ciikYZZ zFGQtw1-yPOYV0W}sXv7BmTaV04&yAJf@8LHB-+v-um^ta!MDkA$$Tr zkIP&V(kXYT;T-I&TnO%ckPXh06JI5Ru3V;~CJOgzci|@8qkQHhvM86sorZ&z|MmR- z_AxrkZH;Bh44Y7BJ&G&rDdg85M+>`;7kd@7``0` v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +html_short_title = 'GeoExt' + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +html_favicon = 'favicon.ico' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'GeoExtdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'GeoExt.tex', u'GeoExt Documentation', + u'GeoExt Community', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True diff --git a/index.rst b/index.rst new file mode 100644 index 0000000..7d67a4f --- /dev/null +++ b/index.rst @@ -0,0 +1,72 @@ +======== + GeoExt +======== + +Download: [Production, Development] + + +What is GeoExt? +=============== + + GeoExt builds Maps + It integrates the mapping power of OpenLayers with the web + application can do of ExtJS. + + [examples] + + GeoExt is OpenSource + description of license opensourceness + + GeoExt is a Growing Community + supported by individuals, businesses and organizations. + + [examples] + + +Documentation +============= + +Quick Start +----------- + + [getting started with GeoExt] + +Tutorials +--------- + + [links to tutorials] + +Reference +--------- + +Read the :ref:`api-reference`. + + + +Development and Support +======================= + +Developer Resources +------------------- + + * Mailing lists + + * IRC + +Contributing to GeoExt +~~~~~~~~~~~~~~~~~~~~~~ + +[patches, commit rights] + +PSC +~~~ + +Description, logs + + +.. toctree:: + :hidden: + :glob: + + lib + lib/* diff --git a/lib.rst b/lib.rst new file mode 100644 index 0000000..4ec9aa1 --- /dev/null +++ b/lib.rst @@ -0,0 +1,28 @@ +.. _api-reference: + +API Reference +============= + +GeoExt components and data utility classes extend map related functionality to +equivalent classes in Ext. The API reference here documents the properties, +methods, and events that are extensions or modifications to the Ext parent +classes. Documentation for each class contains links to the Ext parent class, +and for a full picture of the API, it is essential to have a copy of the +`Ext API Documentation`_ at hand. + +GeoExt classes are typically configured with OpenLayers objects. For detail on +methods and properties provided by these objects, see the +`OpenLayers API Documentation`_. + +.. _`Ext API Documentation`: http://extjs.com/deploy/dev/docs/ +.. _`OpenLayers API Documentation`: http://dev.openlayers.org/apidocs + + +:mod:`GeoExt` +------------- + +.. toctree:: + :glob: + + lib/GeoExt/* + diff --git a/lib/GeoExt.rst b/lib/GeoExt.rst new file mode 100644 index 0000000..afae4fd --- /dev/null +++ b/lib/GeoExt.rst @@ -0,0 +1,11 @@ +.. module:: GeoExt + :synopsis: Extending mapping functionality to Ext classes. + +:mod:`GeoExt` +============= + +The :mod:`GeoExt` module contains classes that extent map functionality to Ext +classes. + + + diff --git a/lib/GeoExt/data.rst b/lib/GeoExt/data.rst new file mode 100644 index 0000000..573b6bd --- /dev/null +++ b/lib/GeoExt/data.rst @@ -0,0 +1,14 @@ +.. module:: GeoExt.data + :synopsis: A collection of map data related classes. + +:mod:`GeoExt.data` +================== + +The :mod:`GeoExt.data` module contains classes that extend map related +functionality to ``Ext.data`` classes. + +.. toctree:: + :maxdepth: 1 + :glob: + + data/* \ No newline at end of file diff --git a/lib/GeoExt/data/FeatureReader.rst b/lib/GeoExt/data/FeatureReader.rst new file mode 100644 index 0000000..b3e2ce3 --- /dev/null +++ b/lib/GeoExt/data/FeatureReader.rst @@ -0,0 +1,49 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.FeatureReader` +================================== + +.. class:: FeatureReader + + Data reader class to create an array of :class:`GeoExt.data.FeatureRecord` + objects from an ``OpenLayers.Protocol.Response`` object for use in a + :class:`GeoExt.data.FeatureStore` object. + + .. rubric:: Extends + + * `Ext.data.DataReader`_ + +.. _`Ext.data.DataReader`: http://extjs.com/deploy/dev/docs/?class=Ext.data.DataReader + + +Example Use +----------- + +Sample code to create a store that uses a feature reader: + +.. code-block:: javascript + + var store = new Ext.data.Store({ + reader: new GeoExt.data.FeatureReader({}, [ + {name: 'name', type: 'string'}, + {name: 'elevation', type: 'float'} + ]) + }); + + +Public Methods +-------------- + +Public methods in addition to those listed for `Ext.data.DataReader`_. + +.. method:: FeatureReader.readRecords(features) + + :param features: ``Array(OpenLayers.Feature.Vector)`` List of features for + creating records + + :return: ``Object`` An object with ``records`` and ``totalRecords`` properties. + + Create a data block containing :class:`GeoExt.data.FeatureRecord` objects + from an array of features. + + diff --git a/lib/GeoExt/data/FeatureRecord.rst b/lib/GeoExt/data/FeatureRecord.rst new file mode 100644 index 0000000..ff2e76e --- /dev/null +++ b/lib/GeoExt/data/FeatureRecord.rst @@ -0,0 +1,20 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.FeatureRecord` +================================== + +.. class:: FeatureRecord + + Create a record representing an ``OpenLayers.Feature.Vector`` object. + + * feature ``OpenLayers.Feature.Vector`` + * state ``String`` + * fid ``String`` + + .. rubric:: Extends + + * `Ext.data.Record`_ + +.. _`Ext.data.Record`: http://extjs.com/deploy/dev/docs/?class=Ext.data.Record + + diff --git a/lib/GeoExt/data/FeatureStore.rst b/lib/GeoExt/data/FeatureStore.rst new file mode 100644 index 0000000..7ec6326 --- /dev/null +++ b/lib/GeoExt/data/FeatureStore.rst @@ -0,0 +1,61 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.FeatureStore` +================================= + +.. class:: FeatureStore + + A store containing :class:`GeoExt.data.FeatureRecord` entries that + optionally synchronizes with an ``OpenLayers.Layer.Vector``. + + .. rubric:: Extends + + * `Ext.data.Store`_ + +.. _`Ext.data.Store`: http://extjs.com/deploy/dev/docs/?class=Ext.data.Store + + +Example Use +----------- + +Sample code to create a store with features from a vector layer: + +.. code-block:: javascript + + var store = new GeoExt.data.FeatureStore({ + layer: myLayer, + features: myFeatures + }); + + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.data.Store`_. + +.. describe:: layer + + ``OpenLayers.Layer.Vector`` Layer to synchronize the store with. + +.. describe:: features + + ``Array(OpenLayers.Feature.Vector)`` Features that will be added to the + store (and the layer if provided). + +.. describe:: fields + + ``Array`` If provided, a custom feature record type with additional fields + will be used. Default fields for every feature record are + feature (``OpenLayers.Feature.Vector``), state (``String``) and + fid (``Number or String``). The value of this option is either an array of + field definition objects as passed to the :func:`GeoExt.data.FeatureRecord.create` + function or a :class:`GeoExt.data.FeatureRecord` constructor created using + :func:`GeoExt.data.FeatureRecord.create`. + +.. describe:: initDir + + ``Number`` Bitfields specifying the direction to use for the + initial sync between the layer and the store, if set to 0 then no + initial sync is done. Defaults to + ``GeoExt.data.FeatureStore.LAYER_TO_STORE|GeoExt.data.FeatureStore.STORE_TO_LAYER``. + diff --git a/lib/GeoExt/data/LayerReader.rst b/lib/GeoExt/data/LayerReader.rst new file mode 100644 index 0000000..196d2c5 --- /dev/null +++ b/lib/GeoExt/data/LayerReader.rst @@ -0,0 +1,29 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.LayerReader` +================================ + +.. class:: LayerReader + + Data reader class to create an array of :class:`GeoExt.data.LayerRecord` + objects from an array of ``OpenLayers.Layer`` objects for use in a + :class:`GeoExt.data.LayerStore`. + + .. rubric:: Extends + + * `Ext.data.DataReader`_ + +.. _`Ext.data.DataReader`: http://extjs.com/deploy/dev/docs/?class=Ext.data.DataReader + + +Example Use +----------- + +Sample code to create a layer reader and access records: + +.. code-block:: javascript + + var reader = new GeoExt.data.LayerReader(); + var data = reader.readRecords(map.layers); + var numRecords = layerData.totalRecords; + var records = layerData.records; diff --git a/lib/GeoExt/data/LayerRecord.rst b/lib/GeoExt/data/LayerRecord.rst new file mode 100644 index 0000000..c0389f9 --- /dev/null +++ b/lib/GeoExt/data/LayerRecord.rst @@ -0,0 +1,20 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.LayerRecord` +================================ + +.. class:: LayerRecord + + Create a record representing an ``OpenLayers.Feature.Vector`` object. + This layer will always have at least the following fields: + + * layer ``OpenLayers.Layer`` + * title ``String`` + + .. rubric:: Extends + + * `Ext.data.Record`_ + +.. _`Ext.data.Record`: http://extjs.com/deploy/dev/docs/?class=Ext.data.Record + + diff --git a/lib/GeoExt/data/LayerStore.rst b/lib/GeoExt/data/LayerStore.rst new file mode 100644 index 0000000..ae23412 --- /dev/null +++ b/lib/GeoExt/data/LayerStore.rst @@ -0,0 +1,55 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.LayerStore` +=============================== + +.. class:: LayerStore + + A store that synchronizes the layers array of an ``OpenLayers.Map`` + with a store holding :class:`GeoExt.data.LayerRecord` entries. + + .. rubric:: Extends + + * `Ext.data.Store`_ + +.. _`Ext.data.Store`: http://extjs.com/deploy/dev/docs/?class=Ext.data.Store + + +Example Use +----------- + +Sample code to create a store that synchronizes layers with a map. + +.. code-block:: javascript + + var store = new GeoExt.data.LayerStore({ + map: myMap, + layers: myLayers + }); + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.data.Store`_. + +.. describe:: map + + ``OpenLayers.Map`` Map to synchronize the store with. + +.. describe:: layers + + ``Array(OpenLayers.Layer)`` Layers that will be added to the + store (and the map if provided). + +.. describe:: recordType + + ``Ext.data.Record`` Custom record type to use. If not provided, the + :class:`GeoExt.data.LayerRecord` constructor will be used to create records. + +.. describe:: initDir + + ``Number`` Bitfields specifying the direction to use for the + initial sync between the map and the store, if set to 0 then no + initial sync is done. Defaults to + ``GeoExt.data.LayerStore.MAP_TO_STORE|GeoExt.data.LayerStore.STORE_TO_MAP``. + diff --git a/lib/GeoExt/data/ProtocolProxy.rst b/lib/GeoExt/data/ProtocolProxy.rst new file mode 100644 index 0000000..566d3a9 --- /dev/null +++ b/lib/GeoExt/data/ProtocolProxy.rst @@ -0,0 +1,53 @@ +.. currentmodule:: GeoExt.data + +:class:`GeoExt.data.ProtocolProxy` +================================== + +.. class:: ProtocolProxy + + Create an ``Ext.data.DataProxy`` with an ``OpenLayers.Protocol`` for + requesting remote feature data. + + .. rubric:: Extends + + * `Ext.data.DataProxy`_ + +.. _`Ext.data.DataProxy`: http://extjs.com/deploy/dev/docs/?class=Ext.data.DataProxy + + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.data.DataProxy`_. + +.. describe:: protocol + + ``OpenLayers.Protocol`` The protocol used to fetch features. + +.. describe:: abortPrevious + + ``Boolean`` Abort the previous request, defaults to ``true``. + + +Public Methods +-------------- + +Public methods in addition to those for `Ext.data.DataProxy`_. + +.. method:: ProtocolProxy.load(params, reader, callback, scope, arg) + + :param params: ``Object`` An object containing properties which are to be + used as HTTP parameters for the request to the remote server. + + :param reader: ``Ext.data.DataReader`` The Reader object which converts the + data object into a block of ``Ext.data.Record`` objects. + + :param callback: ``Function`` The function into which to pass the block of + ``Ext.data.Record`` objects. The function is passed the Record block + object, the ``arg`` argument passed to the :meth:`load` function, + and a boolean success indicator. + + :param scope: ``Object`` The scope in which to call the callback. + + :param arg: ``Object`` An optional argument which is passed to the callback + as its second parameter. diff --git a/lib/GeoExt/widgets.rst b/lib/GeoExt/widgets.rst new file mode 100644 index 0000000..ac98a12 --- /dev/null +++ b/lib/GeoExt/widgets.rst @@ -0,0 +1,10 @@ +Widgets +======= + +GeoExt widgets are a collection of specialized map related components. + +.. toctree:: + :maxdepth: 1 + :glob: + + widgets/* diff --git a/lib/GeoExt/widgets/MapPanel.rst b/lib/GeoExt/widgets/MapPanel.rst new file mode 100644 index 0000000..296b0ff --- /dev/null +++ b/lib/GeoExt/widgets/MapPanel.rst @@ -0,0 +1,95 @@ +.. currentmodule:: GeoExt + +:class:`GeoExt.MapPanel` +======================== + +.. class:: MapPanel(config) + + Create a panel container for a map. + + .. describe:: xtype + + gx_mappanel + + .. rubric:: Extends + + * `Ext.Panel`_ + + +.. _`Ext.Panel`: http://extjs.com/deploy/dev/docs/?class=Ext.Panel + + +Example Use +----------- + +Sample code to create a panel with a new map: + +.. code-block:: javascript + + var mapPanel = new GeoExt.MapPanel({ + border: false, + renderTo: "div-id", + map: { + maxExtent: new OpenLayers.Bounds(-90, -45, 90, 45) + } + }); + +Sample code to create a map panel with a bottom toolbar in a Window: + +.. code-block:: javascript + + var win = new Ext.Window({ + title: "My Map", + items: [{ + xtype: "gx_mappanel", + bbar: new Ext.Toolbar() + }] + }); + + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.Panel`_. + +.. describe:: 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. + +.. describe:: layers + + ``GeoExt.data.LayerStore or GeoExt.data.GroupingStore or Array(OpenLayers.Layer)`` + A store holding records. If not provided, an empty + :class:`GeoExt.data.LayerStore` will be created. + +.. describe:: center + + ``OpenLayers.LonLat or Array(Number)`` A location for the map center. If + an array is provided, the first two items should represent x & y coordinates. + +.. describe:: zoom + + ``Number`` An initial zoom level for the map. + +.. describe:: extent + + ``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. + + +Public Properties +----------------- + +Public properties in addition to those listed for `Ext.Panel`_. + +.. attribute:: MapPanel.map + + ``OpenLayers.Map`` A configured map object. + +.. attribute:: MapPanel.layers + + :class:`GeoExt.data.LayerStore` A store containing + :class:`GeoExt.data.LayerRecord` objects. diff --git a/lib/GeoExt/widgets/Popup.rst b/lib/GeoExt/widgets/Popup.rst new file mode 100644 index 0000000..787e2c6 --- /dev/null +++ b/lib/GeoExt/widgets/Popup.rst @@ -0,0 +1,67 @@ +.. currentmodule:: GeoExt + +``GeoExt.Popup`` +================ + +.. class:: Popup(config) + + Create a specialized ``Ext.Window`` that supports anchoring to a particular + location in a :class:`GeoExt.MapPanel`. When a popup is anchored to a location, + the popup will visibly point to the location on the map, and move when the + map is panned or zoomed. + + .. describe:: xtype + + gx_mappanel + + .. rubric:: Extends + + * `Ext.Window`_ + +.. _`Ext.Window`: http://extjs.com/deploy/dev/docs/?class=Ext.Window + +Example Use +----------- + + Sample code to create a panel with a new map: + + .. code-block:: javascript + + var popup = new GeoExt.Popup({ + title: 'My Popup', + feature: feature, + width: 200, + html: "
Popup content
", + collapsible: true + }); + + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.Window`_. + +.. describe:: anchored + + ``Boolean`` The popup begins anchored to a feature. + +.. describe:: panIn + + ``Boolean`` The map should pan so the popup is fully in view when it is + rendered. + +.. describe:: unpinnable + + ``Boolean`` Render an `unpin` tool on the popup that unanchors it from + the feature. + +.. describe:: feature + + ``OpenLayers.Feature.Vector`` A feature that serves as the popup's + anchor. + +.. describe:: lonlat + + ``OpenLayers.LonLat`` A location for the anchor (assuming no feature is + given). + diff --git a/lib/template_rst.txt b/lib/template_rst.txt new file mode 100644 index 0000000..5d0edbb --- /dev/null +++ b/lib/template_rst.txt @@ -0,0 +1,83 @@ +.. currentmodule:: Full + +:class:`Full.ClassName` +======================= + +.. class:: ClassName(config) + + Create a specialized ``Ext.Foo`` that creates objects for use in + a :class:`Full.OtherClass`. + + .. rubric:: Extends + + * `Ext.Foo`_ + +.. _`Ext.Foo`: http://extjs.com/deploy/dev/docs/?class=Ext.Foo + +Example Use +----------- + +Sample code to create a thing: + +.. code-block:: javascript + + var thing = new Full.ClassName({ + title: 'My Thing', + collapsible: true + }); + + +Config Options +-------------- + +Configuration properties in addition to those listed for `Ext.Foo`_. + +.. describe:: anchored + + ``Boolean`` The thing begins anchored to a location. Default is false. + +.. describe:: doMagic + + ``Function`` Do some magic. + +.. describe:: location + + ``OpenLayers.LonLat`` A location that serves as the thing's anchor. + + +Public Properties +----------------- + +Properties in addition to those listed for `Ext.Foo`_. + +.. attribute:: ClassName.location + + ``OpenLayers.LonLat`` The anchor location. + + +Public Methods +-------------- + +Public methods in addition to those listed for `Ext.Foo`_. + +.. method:: ClassName.doSomething(first [, second]) + + :param first: ``String`` The first argument. If the description runs on + for a few lines, make sure to indent all after the first. + + :param second: :class:`Full.SomeClass` The optional second argument + + :returns: ``Number`` The number of things done. + + This method does something. The description of what it does goes here. And + continues on subsequent lines with the same indentation. + + +Events +------ + +Events in addition to those listed for `Ext.Foo`_. + +.. describe:: somethingdone + + Fired when something is done.