OpenLayers OpenLayers

Changeset 7537

Show
Ignore:
Timestamp:
07/17/08 11:07:47 (2 months ago)
Author:
elemoine
Message:

sync with vector-behavior

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/camptocamp/unhcr/build/full.cfg

    r7349 r7537  
    1919OpenLayers/Lang/fr.js 
    2020OpenLayers/Lang/it.js 
     21OpenLayers/Lang/nb.js 
    2122OpenLayers/Lang/pt-BR.js 
    2223OpenLayers/Lang/sv-SE.js 
     24OpenLayers/Lang/zh-TW.js 
  • sandbox/camptocamp/unhcr/build/library.cfg

    r7349 r7537  
    5252OpenLayers/Lang/fr.js 
    5353OpenLayers/Lang/it.js 
     54OpenLayers/Lang/nb.js 
    5455OpenLayers/Lang/pt-BR.js 
    5556OpenLayers/Lang/sv-SE.js 
     57OpenLayers/Lang/zh-TW.js 
    5658 
     59 
  • sandbox/camptocamp/unhcr/build/lite.cfg

    r7349 r7537  
    2020 
    2121[exclude] 
    22 Firebug/firebug.js 
    23 Firebug/firebugx.js 
    24 OpenLayers/Lang/cs-CZ.js 
    25 OpenLayers/Lang/de.js 
    26 OpenLayers/Lang/en-CA.js 
    27 OpenLayers/Lang/fr.js 
    28 OpenLayers/Lang/it.js 
    29 OpenLayers/Lang/pt-BR.js 
    30 OpenLayers/Lang/sv-SE.js 
    3122 
     23 
  • sandbox/camptocamp/unhcr/examples/editingtoolbar-outside.html

    r7237 r7537  
    4343  <body onload="init()"> 
    4444    <h1 id="title">OpenLayers EditingToolbar Outside Viewport</h1> 
     45    <p id="shortdesc"> 
     46        Display an editing toolbar panel outside the map viewport. 
     47    </p> 
    4548    <div id="map" class="smallmap"></div> 
    4649    <div id="panel" class="olControlEditingToolbar"></div> 
  • sandbox/camptocamp/unhcr/examples/georss-flickr.html

    r7237 r7537  
    4747            style.addRules([rule, elseRule]); 
    4848             
    49             // Create a layer with a style map.  Giving the style map keys 
    50             // for "default" and "select" rendering intent. 
    51             markerLayer = new OpenLayers.Layer.Vector("", { 
     49            // Create a GML layer with GeoRSS format and a style map. 
     50            markerLayer = new OpenLayers.Layer.GML("Some images from Flickr", 
     51                                                   "xml/georss-flickr.xml", { 
     52                format: OpenLayers.Format.GeoRSS, 
     53                formatOptions: { 
     54                    // adds the thumbnail attribute to the feature 
     55                    createFeatureFromItem: function(item) { 
     56                        var feature = OpenLayers.Format.GeoRSS.prototype 
     57                                .createFeatureFromItem.apply(this, arguments); 
     58                        feature.attributes.thumbnail = 
     59                                this.getElementsByTagNameNS( 
     60                                item, "*", "thumbnail")[0].getAttribute("url"); 
     61                        return feature; 
     62                    } 
     63                }, 
     64                // Giving the style map keys for "default" and "select" 
     65                // rendering intent, to make the image larger when selected 
    5266                styleMap: new OpenLayers.StyleMap({ 
    5367                    "default": style, 
     
    7690             
    7791            popupControl.activate(); 
    78              
    79             OpenLayers.loadURL("xml/georss-flickr.xml", null, window, afterload); 
    80              
    81         } 
    82          
    83         function afterload(req) { 
    84             // extended version of OpenLayers.Format.GeoRSS.createFeatureFromItem; 
    85             // adds the thumbnail attribute to the feature 
    86             function createFeatureFromItem(item) { 
    87                 var feature = OpenLayers.Format.GeoRSS.prototype 
    88                         .createFeatureFromItem.apply(this, arguments); 
    89                 feature.attributes.thumbnail = 
    90                         this.getElementsByTagNameNS( 
    91                         item, "*", "thumbnail")[0].getAttribute("url"); 
    92                 return feature; 
    93             } 
    94  
    95             var store = new OpenLayers.Format.GeoRSS({ 
    96                     createFeatureFromItem: createFeatureFromItem}); 
    97  
    98             rss = store.read(req.responseText); 
    99  
    100             markerLayer.setName("Some images from Flickr"); 
    101             markerLayer.addFeatures(rss); 
    10292        } 
    10393    </script> 
  • sandbox/camptocamp/unhcr/examples/intersects.html

    r7237 r7537  
    162162    <div id="leftcol"> 
    163163        <h1 id="title">OpenLayers Geometry Intersection Example</h1> 
     164        <p id="shortdesc"> 
     165            Use of geometry.intersects method for testing geometry intersections. 
     166        </p> 
    164167        <div id="map" class="smallmap"></div> 
    165168        <div id="input"> 
  • sandbox/camptocamp/unhcr/examples/navigation-history.html

    r7237 r7537  
    1818            var map, nav, panel; 
    1919 
    20             // preload images if you care 
    21             var preload = [ 
    22                 "../theme/default/img/view_previous_on.png", 
    23                 "../theme/default/img/view_next_on.png" 
    24             ]; 
    25             var img = new Array(preload.length); 
    26             for(var i=0; i<preload.length; ++i) { 
    27                 img[i] = new Image(); 
    28                 img[i].src = preload[i]; 
    29             } 
    30              
    31             function init(){ 
     20            function init() { 
    3221                map = new OpenLayers.Map('map'); 
    3322 
     
    4938                map.addLayer(layer); 
    5039                map.zoomToMaxExtent(); 
    51  
    52  
    5340            } 
    5441        </script> 
  • sandbox/camptocamp/unhcr/examples/projected-map.html

    r7237 r7537  
    4848            map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); 
    4949            map.addControl(new OpenLayers.Control.LayerSwitcher()); 
     50            map.addControl(new OpenLayers.Control.ScaleLine()); 
    5051        } 
    5152    </script> 
  • sandbox/camptocamp/unhcr/examples/proxy.cgi

    r7237 r7537  
    1919                'labs.metacarta.com', 'world.freemap.in',  
    2020                'prototype.openmnnd.org', 'geo.openplans.org', 
    21                 'sigma.openplans.org' 
    22                 'www.openstreetmap.org'] 
     21                'sigma.openplans.org', 'www.openstreetmap.org', 
     22                'www.bsc-eoc.org'] 
    2323 
    2424method = os.environ["REQUEST_METHOD"] 
  • sandbox/camptocamp/unhcr/examples/rotate-features.html

    r7237 r7537  
    7878            var center = new OpenLayers.Feature.Vector(origin, null, style); 
    7979            vectorLayer.addFeatures([center]); 
    80             window.setInterval(rotateFeature, 100, 
    81                                pointFeature, 360 / 20, origin)
    82             window.setInterval(rotateFeature, 100, 
    83                                lineFeature, 360 / 40, origin)
    84             window.setInterval(rotateFeature, 100, 
    85                                polygonFeature, -360 / 20, origin)
     80            window.setInterval(function() {rotateFeature( 
     81                               pointFeature, 360 / 20, origin)}, 100)
     82            window.setInterval(function() {rotateFeature( 
     83                               lineFeature, 360 / 40, origin)}, 100)
     84            window.setInterval(function(){rotateFeature( 
     85                               polygonFeature, -360 / 20, origin)}, 100)
    8686        } 
    8787 
  • sandbox/camptocamp/unhcr/examples/sld.html

    r7237 r7537  
    9292  <body onload="init()"> 
    9393    <h1 id="title">Styled Layer Descriptor (SLD) Example</h1> 
     94    <p id="shortdesc"> 
     95        Parsing SLD and applying styles to a vector layer. 
     96    </p> 
    9497    <div id="map" class="smallmap"></div> 
    95     <p>This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD 
     98    <p id="docs">This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD 
    9699    file</a> to style the vector features. To construct layers that use styles 
    97100    from SLD, create a StyleMap for the layer that uses one of the userStyles in the 
  • sandbox/camptocamp/unhcr/examples/spherical-mercator.html

    r7349 r7537  
    4242            var gsat = new OpenLayers.Layer.Google( 
    4343                "Google Satellite", 
    44                 {type: G_SATELLITE_MAP, 'sphericalMercator': true
     44                {type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22
    4545            ); 
    4646            var ghyb = new OpenLayers.Layer.Google( 
     
    8585                    displayOutsideMaxExtent: true, 
    8686                    attribution: '<a href="http://www.openstreetmap.org/">OpenStreetMap</a>' 
     87                } 
     88            ); 
     89            // create OSM layer 
     90            var mapnik = new OpenLayers.Layer.TMS( 
     91                "OpenAerialMap", 
     92                "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/", 
     93                { 
     94                    type: 'png', getURL: osm_getTileURL 
    8795                } 
    8896            ); 
  • sandbox/camptocamp/unhcr/examples/styles-unique.html

    r7241 r7537  
    9393 
    9494    <p id="shortdesc"> 
    95       Shows how to create a style based : 
    96       <ul>  
    97         <li>on unique feature attribute values (markers),</li> 
    98         <li>on feature state values (circles).</li> 
    99       </ul> 
     95        Shows how to create a style based on unique feature attribute values (markers) 
     96        and feature state values (circles). 
    10097    </p> 
    10198 
  • sandbox/camptocamp/unhcr/lib/OpenLayers.js

    r7349 r7537  
    193193            "OpenLayers/Strategy/GreedySave.js", 
    194194            "OpenLayers/Strategy/Autosave.js", 
     195            "OpenLayers/Strategy/Cluster.js", 
     196            "OpenLayers/Strategy/Paging.js", 
    195197            "OpenLayers/Protocol.js", 
    196198            "OpenLayers/Protocol/HTTP.js", 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes.js

    r6829 r7537  
    135135        } 
    136136        return tokens.join(""); 
     137    }, 
     138     
     139    /** 
     140     * Property: OpenLayers.String.numberRegEx 
     141     * Used to test strings as numbers. 
     142     */ 
     143    numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/, 
     144     
     145    /** 
     146     * APIFunction: OpenLayers.String.isNumeric 
     147     * Determine whether a string contains only a numeric value. 
     148     * 
     149     * Examples: 
     150     * (code) 
     151     * OpenLayers.String.isNumeric("6.02e23") // true 
     152     * OpenLayers.String.isNumeric("12 dozen") // false 
     153     * OpenLayers.String.isNumeric("4") // true 
     154     * OpenLayers.String.isNumeric(" 4 ") // false 
     155     * (end) 
     156     * 
     157     * Returns: 
     158     * {Boolean} String contains only a number. 
     159     */ 
     160    isNumeric: function(value) { 
     161        return OpenLayers.String.numberRegEx.test(value); 
    137162    } 
    138163 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes/Bounds.js

    r7028 r7537  
    3939     * {Number} Maximum vertical coordinate. 
    4040     */ 
    41     top: null,     
     41    top: null, 
     42     
     43    /** 
     44     * Property: center 
     45     * {<OpenLayers.LonLat>} Use <getCenterLonLat>. 
     46     */ 
     47    center: null, 
    4248 
    4349    /** 
     
    216222     */ 
    217223    getCenterLonLat:function() { 
    218         return new OpenLayers.LonLat( (this.left + this.right) / 2, 
    219                                       (this.bottom + this.top) / 2); 
     224        if(!this.center) { 
     225            this.center = new OpenLayers.LonLat( 
     226                (this.left + this.right) / 2, (this.bottom + this.top) / 2 
     227            ); 
     228        } 
     229        return this.center; 
    220230    }, 
    221231 
     
    282292            } 
    283293        } 
     294        this.center = null; 
    284295    }, 
    285296 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Control/NavigationHistory.js

    r6833 r7537  
    138138        var previousOptions = { 
    139139            trigger: OpenLayers.Function.bind(this.previousTrigger, this), 
    140             displayClass: this.displayClass + "Previous" 
     140            displayClass: this.displayClass + " " + this.displayClass + "Previous" 
    141141        }; 
    142142        OpenLayers.Util.extend(previousOptions, this.previousOptions); 
     
    145145        var nextOptions = { 
    146146            trigger: OpenLayers.Function.bind(this.nextTrigger, this), 
    147             displayClass: this.displayClass + "Next" 
     147            displayClass: this.displayClass + " " + this.displayClass + "Next" 
    148148        }; 
    149149        OpenLayers.Util.extend(nextOptions, this.nextOptions); 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Control/OverviewMap.js

    r6810 r7537  
    496496        // The base layer for overview map needs to be in the same projection 
    497497        // as the base layer for the main map.  This should be made more robust. 
    498         if(this.map.units != 'degrees') { 
     498        if(this.map.getUnits() != 'degrees') { 
    499499            if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) { 
    500500                alert(OpenLayers.i18n("sameProjection")); 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Control/Permalink.js

    r7304 r7537  
    154154         
    155155        params.layers = ''; 
    156         for(var i=0; i< this.map.layers.length; i++) { 
     156        for (var i=0; i < this.map.layers.length; i++) { 
    157157            var layer = this.map.layers[i]; 
    158158 
     
    165165 
    166166        var href = this.base; 
    167         if( href.indexOf('?') != -1 )
     167        if (href.indexOf('?') != -1)
    168168            href = href.substring( 0, href.indexOf('?') ); 
    169169        } 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Control/ScaleLine.js

    r6727 r7537  
    154154        } 
    155155 
    156         var curMapUnits = this.map.units
     156        var curMapUnits = this.map.getUnits()
    157157        var inches = OpenLayers.INCHES_PER_UNIT; 
    158158 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Feature/Vector.js

    r7304 r7537  
    8181                                                      [null, null, attributes]); 
    8282        this.lonlat = null; 
    83         this.geometry = geometry
     83        this.geometry = geometry ? geometry : null
    8484        this.state = null; 
    8585        this.attributes = {}; 
     
    207207        } 
    208208        return atPoint; 
    209     }, 
    210  
    211     /** 
    212      * Method: getVertices 
    213      * Returns all the vertices of the geometry. 
    214      * 
    215      * Return: 
    216      * {Array(<OpenLayers.Geometry.Point>)} Vertices 
    217      */ 
    218     getVertices: function() { 
    219         if (this.geometry) { 
    220             return this.geometry.getVertices(); 
    221         } else { 
    222             return []; 
    223         } 
    224     }, 
    225  
    226     /** 
    227      * Method: getEdges 
    228      * Returns all the edges of the geometry. 
    229      * 
    230      * Return: 
    231      * {Array(<OpenLayers.Geometry.LineString>)} Edges 
    232      */ 
    233     getEdges: function() { 
    234         if (this.geometry) { 
    235             return this.geometry.getEdges(); 
    236         } else { 
    237             return []; 
    238         } 
    239209    }, 
    240210 
     
    346316        hoverPointUnit: "%", 
    347317        pointerEvents: "visiblePainted", 
    348         cursor: "
     318        cursor: "inherit
    349319    }, 
    350320    'select': { 
     
    382352        hoverPointUnit: "%", 
    383353        pointerEvents: "visiblePainted", 
    384         cursor: "
     354        cursor: "inherit
    385355    } 
    386356};     
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Format/GeoRSS.js

    r6833 r7537  
    224224    getChildValue: function(node, nsuri, name, def) { 
    225225        var value; 
    226         try { 
    227             value = this.getElementsByTagNameNS(node, nsuri, name)[0].firstChild.nodeValue; 
    228         } catch(e) { 
     226        var eles = this.getElementsByTagNameNS(node, nsuri, name); 
     227        if(eles && eles[0] && eles[0].firstChild 
     228            && eles[0].firstChild.nodeValue) { 
     229            value = eles[0].firstChild.nodeValue; 
     230        } else { 
    229231            value = (def == undefined) ? "" : def; 
    230232        } 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Format/WKT.js

    r5614 r7537  
    6868                    features.geometry.transform(this.externalProjection, 
    6969                                                this.internalProjection); 
    70                 } else if (features && typeof features == "object") { 
     70                } else if (features && 
     71                           type != "geometrycollection" && 
     72                           typeof features == "object") { 
    7173                    for (var i = 0; i < features.length; i++) { 
    7274                        var component = features[i]; 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Handler/Box.js

    r5614 r7537  
    8585    */ 
    8686    moveBox: function (xy) { 
    87         var deltaX = Math.abs(this.dragHandler.start.x - xy.x); 
    88         var deltaY = Math.abs(this.dragHandler.start.y - xy.y); 
     87        var startX = this.dragHandler.start.x; 
     88        var startY = this.dragHandler.start.y; 
     89        var deltaX = Math.abs(startX - xy.x); 
     90        var deltaY = Math.abs(startY - xy.y); 
    8991        this.zoomBox.style.width = Math.max(1, deltaX) + "px"; 
    9092        this.zoomBox.style.height = Math.max(1, deltaY) + "px"; 
    91         if (xy.x < this.dragHandler.start.x) { 
    92             this.zoomBox.style.left = xy.x+"px"; 
    93         } 
    94         if (xy.y < this.dragHandler.start.y) { 
    95             this.zoomBox.style.top = xy.y+"px"; 
    96         } 
     93        this.zoomBox.style.left = xy.x < startX ? xy.x+"px" : startX+"px"; 
     94        this.zoomBox.style.top = xy.y < startY ? xy.y+"px" : startY+"px"; 
    9795    }, 
    9896 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/en.js

    r6313 r7537  
    7676        "in the layer switcher in the upper-right corner.<br><br>" + 
    7777        "Most likely, this is because the ${layerLib} library " + 
    78         "script was either not correctly included.<br><br>" + 
     78        "script was not correctly included.<br><br>" + 
    7979        "Developers: For help getting this working correctly, " + 
    8080        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " + 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/fr.js

    r6313 r7537  
    1515OpenLayers.Lang.fr = { 
    1616 
    17     'overlays': "Couches de superposition" 
     17    'unhandledRequest': "Requête non gérée, retournant ${statusText}", 
     18 
     19    'permalink': "Permalien", 
     20 
     21    'overlays': "Calques", 
     22 
     23    'baseLayer': "Calque de base", 
     24 
     25    'sameProjection': 
     26        "La carte de situation ne fonctionne que lorsque sa projection est la même que celle de la carte principale", 
     27 
     28    'readNotImplemented': "Lecture non implémentée.", 
     29 
     30    'writeNotImplemented': "Ecriture non implémentée.", 
     31 
     32    'noFID': "Impossible de mettre à jour un objet sans identifiant (fid).", 
     33 
     34    'errorLoadingGML': "Erreur au chargement du fichier GML ${url}", 
     35 
     36    'browserNotSupported': 
     37        "Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}", 
     38 
     39    'componentShouldBe': "addFeatures : le composant devrait être de type ${geomType}", 
     40 
     41    // console message 
     42    'getFeatureError': 
     43        "getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous " + 
     44        "avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.", 
     45 
     46    // console message 
     47    'minZoomLevelError': 
     48        "La propriété minZoomLevel doit seulement être utilisée " + 
     49        "pour des couches FixedZoomLevels-descendent. Le fait que " + 
     50        "cette couche WFS vérifie la présence de minZoomLevel " + 
     51        "est une relique du passé. Nous ne pouvons toutefois la " + 
     52        "supprimer sans casser des applications qui pourraient en dépendre." + 
     53        " C'est pourquoi nous la déprécions -- la vérification du minZoomLevel " + 
     54        "sera supprimée en version 3.0. A la place, merci d'utiliser " + 
     55        "les paramÚtres de résolutions min/max tel que décrit sur : " + 
     56        "http://trac.openlayers.org/wiki/SettingZoomLevels", 
     57 
     58    'commitSuccess': "Transaction WFS : SUCCES ${response}", 
     59 
     60    'commitFailed': "Transaction WFS : ECHEC ${response}", 
     61 
     62    'googleWarning': 
     63        "La couche Google n'a pas été en mesure de se charger correctement.<br><br>" + 
     64        "Pour supprimer ce message, choisissez une nouvelle BaseLayer " + 
     65        "dans le sélecteur de couche en haut à droite.<br><br>" + 
     66        "Cela est possiblement causé par la non-inclusion de la " + 
     67        "librairie Google Maps, ou alors parce que la clé de l'API " + 
     68        "ne correspond pas à votre site.<br><br>" + 
     69        "Développeurs : pour savoir comment corriger ceci, " + 
     70        "<a href='http://trac.openlayers.org/wiki/Google' " + 
     71        "target='_blank'>cliquez ici</a>", 
     72 
     73    'getLayerWarning': 
     74        "La couche ${layerType} n'est pas en mesure de se charger correctement.<br><br>" + 
     75        "Pour supprimer ce message, choisissez une nouvelle BaseLayer " + 
     76        "dans le sélecteur de couche en haut à droite.<br><br>" + 
     77        "Cela est possiblement causé par la non-inclusion de la " + 
     78        "librairie ${layerLib}.<br><br>" + 
     79        "Développeurs : pour savoir comment corriger ceci, " + 
     80        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " + 
     81        "target='_blank'>cliquez ici</a>", 
     82 
     83    'scale': "Echelle ~ 1 : ${scaleDenom}", 
     84 
     85    // console message 
     86    'layerAlreadyAdded': 
     87        "Vous avez essayé d'ajouter à la carte le calque : ${layerName}, mais il est déjà présent", 
     88 
     89    // console message 
     90    'reprojectDeprecated': 
     91        "Vous utilisez l'option 'reproject' " + 
     92        "sur la couche ${layerName}. Cette option est dépréciée : " + 
     93        "Son usage permettait d'afficher des données au dessus de couches raster commerciales." +  
     94        "Cette fonctionalité est maintenant supportée en utilisant le support de la projection " + 
     95        "Mercator Sphérique. Plus d'information est disponible sur " + 
     96        "http://trac.openlayers.org/wiki/SphericalMercator.", 
     97 
     98    // console message 
     99    'methodDeprecated': 
     100        "Cette méthode est dépréciée, et sera supprimée à la version 3.0. " + 
     101        "Merci d'utiliser ${newMethod} à la place.", 
     102 
     103    // console message 
     104    'boundsAddError': "Vous devez passer les deux valeurs x et y à la fonction add.", 
     105 
     106    // console message 
     107    'lonlatAddError': "Vous devez passer les deux valeurs lon et lat à la fonction add.", 
     108 
     109    // console message 
     110    'pixelAddError': "Vous devez passer les deux valeurs x et y à la fonction add.", 
     111 
     112    // console message 
     113    'unsupportedGeometryType': "Type de géométrie non supporté : ${geomType}", 
     114 
     115    // console message 
     116    'pagePositionFailed': 
     117        "OpenLayers.Util.pagePosition a échoué: l'élément d'id ${elemId} pourrait être mal positionné.", 
     118     
     119    'end': '' 
    18120 
    19121}; 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/GeoRSS.js

    r7349 r7537  
    122122        OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments); 
    123123        if(this.visibility && !this.loaded){ 
    124             this.events.triggerEvent("loadstart"); 
    125124            this.loadRSS(); 
    126125        } 
  • sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector.js

    r7304 r7537  
    3939     *  - *beforefeatureadded* Triggered before a feature is added.  Listeners 
    4040     *      will receive an object with a *feature* property referencing the 
    41      *      feature to be added. 
     41     *      feature to be added.  To stop the feature from being added, a 
     42     *      listener should return false. 
     43     *  - *beforefeaturesadded* Triggered before an array of features is added. 
     44     *      Listeners will receive an object with a *features* property 
     45     *      referencing the feature to be added. To stop the features from 
     46     *      being added, a listener should return false. 
    4247     *  - *featureadded* Triggered after a feature is added.  The event 
    4348     *      object passed to listeners will have a *feature* property with a 
     
    4954     *      will receive an object with a *feature* property referencing the 
    5055     *      feature to be removed. 
     56     *  - *featureserased* Triggerd after a features are erased. The event 
     57     *      object passed to listeners will have a *features* property with a 
     58     *      reference to the erased features. 
    5159     *  - *featureremoved* Triggerd after a feature is removed. The event 
    5260     *      object passed to listeners will have a *feature* property with a 
     
    7078     *      Listeners will receive an object with a *feature* property referencing  
    7179     *      the modified feature. 
    72      */ 
    73     EVENT_TYPES: ["beforefeatureadded", "featureadded", "featuresadded", 
     80     *  - *refresh* Triggered when something wants a strategy to ask the protocol 
     81     *      for a new set of features. 
     82     */ 
     83    EVENT_TYPES: ["beforefeatureadded", "beforefeaturesadded", 
     84                  "featureadded", "featuresadded", 
    7485                  "beforefeatureremoved", "featureremoved", "featuresremoved", 
    75                   "featureselected", "featureunselected",  
    76                   "beforefeaturemodified", "featuremodified", "afterfeaturemodified"], 
     86                  "featureserased", "featureselected", "featureunselected",  
     87                  "beforefeaturemodified", "featuremodified", "afterfeaturemodified", 
     88                  "refresh"], 
    7789 
    7890    /** 
     
    101113     */ 
    102114    features: null, 
     115 
     116    /** 
     117     * APIProperty: featureMap 
     118     * {Object} A feature fid to <OpenLayers.Feature.Vector> feature map. 
     119     */ 
     120    featureMap: null, 
    103121     
    104122    /**  
     
    194212 
    195213        this.features = []; 
     214        this.featureMap = {}; 
    196215        this.selectedFeatures = []; 
    197216 
     
    216235     */ 
    217236    destroy: function() { 
    218         this.destroyFeatures(); 
    219         this.features = null; 
    220         this.selectedFeatures = null; 
    221         if (this.renderer) { 
    222             this.renderer.destroy(); 
    223         } 
    224         this.renderer = null; 
    225         this.geometryType = null; 
    226         this.drawn = nul