Changeset 6971
- Timestamp:
- 04/19/08 16:57:07 (9 months ago)
- Files:
-
- sandbox/edgemaster/openlayers/lib/OpenLayers/Format/GPX.js (copied) (copied from sandbox/crschmidt/osm/lib/OpenLayers/Format/GPX.js)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Format/SLD.js (modified) (1 diff)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Text.js (modified) (1 diff)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js (modified) (3 diffs)
- sandbox/edgemaster/openlayers/lib/OpenLayers/Popup/Anchored.js (modified) (2 diffs)
- sandbox/edgemaster/openlayers/tests/Layer/Vector.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/edgemaster/openlayers/lib/OpenLayers/Format/SLD.js
r6822 r6971 6 6 * @requires OpenLayers/Format/XML.js 7 7 * @requires OpenLayers/Style.js 8 * @requires OpenLayers/Rule.js 8 9 * @requires OpenLayers/Filter/FeatureId.js 9 10 * @requires OpenLayers/Filter/Logical.js sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Text.js
r6833 r6971 172 172 // FIXME: At the moment, we only use this if we have an 173 173 // 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) { 176 176 iconOffset = new OpenLayers.Pixel( 177 177 feature.style.graphicXOffset, sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/Vector.js
r6961 r6971 13 13 * Class: OpenLayers.Layer.Vector 14 14 * Instances of OpenLayers.Layer.Vector are used to render vector data from 15 * a variety of sources. Create a new imagelayer with the16 * <OpenLayers.Layer.Vector> constructor.15 * a variety of sources. Create a new vector layer with the 16 * <OpenLayers.Layer.Vector> constructor. 17 17 * 18 18 * Inherits from: … … 152 152 * Parameters: 153 153 * name - {String} A name for the layer 154 * options - {Object} options Object with non-default properties to set on154 * options - {Object} Optional object with non-default properties to set on 155 155 * the layer. 156 156 * … … 591 591 }, 592 592 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 593 612 CLASS_NAME: "OpenLayers.Layer.Vector" 594 613 }); sandbox/edgemaster/openlayers/lib/OpenLayers/Popup/Anchored.js
r6718 r6971 19 19 /** 20 20 * 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"). 22 22 */ 23 23 relativePosition: null, … … 127 127 * 128 128 * Returns: 129 * {String} The relative position ("br" "tr" "tl "bl") at which the popup129 * {String} The relative position ("br" "tr" "tl" "bl") at which the popup 130 130 * should be placed. 131 131 */ sandbox/edgemaster/openlayers/tests/Layer/Vector.html
r6724 r6971 17 17 18 18 function test_Layer_Vector_addFeatures(t) { 19 t.plan( 4);19 t.plan(5); 20 20 21 21 var layer = new OpenLayers.Layer.Vector(name); … … 44 44 45 45 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"); 46 49 } 47 50
