OpenLayers OpenLayers

Changeset 6971

Show
Ignore:
Timestamp:
04/19/08 16:57:07 (9 months ago)
Author:
edgemaster
Message:

* Merge from trunk
* Copy in GPX format for further work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Format/SLD.js

    r6822 r6971  
    66 * @requires OpenLayers/Format/XML.js 
    77 * @requires OpenLayers/Style.js 
     8 * @requires OpenLayers/Rule.js 
    89 * @requires OpenLayers/Filter/FeatureId.js 
    910 * @requires OpenLayers/Filter/Logical.js 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Text.js

    r6833 r6971  
    172172            // FIXME: At the moment, we only use this if we have an  
    173173            // externalGraphic, because icon has no setOffset API Method.   
    174             if (feature.style.graphicXOffset  
    175                 && feature.style.graphicYOffset) { 
     174            if (feature.style.graphicXOffset !== null 
     175                && feature.style.graphicYOffset !== null) { 
    176176                iconOffset = new OpenLayers.Pixel( 
    177177                    feature.style.graphicXOffset,  
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js

    r6961 r6971  
    1313 * Class: OpenLayers.Layer.Vector 
    1414 * Instances of OpenLayers.Layer.Vector are used to render vector data from 
    15  * a variety of sources. Create a new image layer with the 
    16  * <OpenLayers.Layer.Vector> constructor. 
     15 *     a variety of sources. Create a new vector layer with the 
     16 *     <OpenLayers.Layer.Vector> constructor. 
    1717 * 
    1818 * Inherits from: 
     
    152152     * Parameters: 
    153153     * name - {String} A name for the layer 
    154      * options - {Object} options Object with non-default properties to set on 
     154     * options - {Object} Optional object with non-default properties to set on 
    155155     *           the layer. 
    156156     * 
     
    591591    }, 
    592592 
     593    /**  
     594     * APIMethod: getDataExtent 
     595     * Calculates the max extent which includes all of the features. 
     596     *  
     597     * Returns: 
     598     * {<OpenLayers.Bounds>} 
     599     */ 
     600    getDataExtent: function () { 
     601        var maxExtent = null; 
     602        if( this.features && (this.features.length > 0)){ 
     603            var maxExtent = this.features[0].geometry.getBounds(); 
     604            for(var i=0; i < this.features.length; i++){ 
     605                maxExtent.extend(this.features[i].geometry.getBounds()); 
     606            } 
     607        } 
     608 
     609        return maxExtent; 
     610    }, 
     611 
    593612    CLASS_NAME: "OpenLayers.Layer.Vector" 
    594613}); 
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Popup/Anchored.js

    r6718 r6971  
    1919    /**  
    2020     * Parameter: relativePosition 
    21      * {String} Relative position of the popup ("lr", "ll", "tr", or "tl"). 
     21     * {String} Relative position of the popup ("br", "tr", "tl" or "bl"). 
    2222     */ 
    2323    relativePosition: null, 
     
    127127     *  
    128128     * Returns: 
    129      * {String} The relative position ("br" "tr" "tl "bl") at which the popup 
     129     * {String} The relative position ("br" "tr" "tl" "bl") at which the popup 
    130130     *     should be placed. 
    131131     */ 
  • sandbox/edgemaster/openlayers/tests/Layer/Vector.html

    r6724 r6971  
    1717     
    1818    function test_Layer_Vector_addFeatures(t) { 
    19         t.plan(4); 
     19        t.plan(5); 
    2020     
    2121        var layer = new OpenLayers.Layer.Vector(name); 
     
    4444 
    4545        layer.addFeatures([pointFeature], {silent: true}); 
     46 
     47        var extent = layer.getDataExtent(); 
     48        t.eq(extent.toBBOX(), "-111.04,45.68,-111.04,45.68", "extent from getDataExtent is correct"); 
    4649    } 
    4750