Bienvenue sur PostGIS.fr

Bienvenue sur PostGIS.fr , le site de la communauté des utilisateurs francophones de PostGIS.

PostGIS ajoute le support d'objets géographique à la base de données PostgreSQL. En effet, PostGIS "spatialise" le serverur PostgreSQL, ce qui permet de l'utiliser comme une base de données SIG.

Maintenu à jour, en fonction de nos disponibilités et des diverses sorties des outils que nous testons, nous vous proposons l'ensemble de nos travaux publiés en langue française.

source: trunk/workshop-routing-foss4g/web/GeoExt/lib/GeoExt/widgets/UrlLegend.js @ 76

Revision 76, 1.5 KB checked in by djay, 12 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1/**
2 * Copyright (c) 2008-2010 The Open Source Geospatial Foundation
3 *
4 * Published under the BSD license.
5 * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
6 * of the license.
7 */
8
9/**
10 * @include GeoExt/widgets/LegendImage.js
11 * @requires GeoExt/widgets/LayerLegend.js
12 */
13
14/** api: (define)
15 *  module = GeoExt
16 *  class = UrlLegend
17 */
18
19/** api: (extends)
20 * GeoExt/widgets/LayerLegend.js
21 */
22
23Ext.namespace('GeoExt');
24
25/** api: constructor
26 *  .. class:: UrlLegend(config)
27 *
28 *      Show a legend image in a BoxComponent and make sure load errors are
29 *      dealt with.
30 */
31GeoExt.UrlLegend = Ext.extend(GeoExt.LayerLegend, {
32
33    /** private: method[initComponent]
34     *  Initializes the legend image component.
35     */
36    initComponent: function() {
37        GeoExt.UrlLegend.superclass.initComponent.call(this);
38        this.add(new GeoExt.LegendImage({
39            url: this.layerRecord.get("legendURL")
40        }));
41    },
42   
43    /** private: method[update]
44     *  Private override
45     */
46    update: function() {
47        GeoExt.UrlLegend.superclass.update.apply(this, arguments);
48        this.items.get(1).setUrl(this.layerRecord.get("legendURL"));
49    }
50
51});
52
53/** private: method[supports]
54 *  Private override
55 */
56GeoExt.UrlLegend.supports = function(layerRecord) {
57    return layerRecord.get("legendURL") != null;
58};
59
60/** api: legendtype = gx_urllegend */
61GeoExt.LayerLegend.types["gx_urllegend"] = GeoExt.UrlLegend;
62
63/** api: xtype = gx_urllegend */
64Ext.reg('gx_urllegend', GeoExt.UrlLegend);
Note: See TracBrowser for help on using the repository browser.