Changeset 7537
- Timestamp:
- 07/17/08 11:07:47 (2 months ago)
- Files:
-
- sandbox/camptocamp/unhcr/build/full.cfg (modified) (1 diff)
- sandbox/camptocamp/unhcr/build/library.cfg (modified) (1 diff)
- sandbox/camptocamp/unhcr/build/lite.cfg (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/animator.js (copied) (copied from sandbox/vector-behavior/examples/animator.js)
- sandbox/camptocamp/unhcr/examples/editingtoolbar-outside.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/georss-flickr.html (modified) (2 diffs)
- sandbox/camptocamp/unhcr/examples/intersects.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/navigation-history.html (modified) (2 diffs)
- sandbox/camptocamp/unhcr/examples/projected-map.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/proxy.cgi (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/rotate-features.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/sld.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/examples/smoothDragging.html (deleted)
- sandbox/camptocamp/unhcr/examples/spherical-mercator.html (modified) (2 diffs)
- sandbox/camptocamp/unhcr/examples/strategy-cluster.html (copied) (copied from sandbox/vector-behavior/examples/strategy-cluster.html)
- sandbox/camptocamp/unhcr/examples/strategy-grid.html (copied) (copied from sandbox/vector-behavior/examples/strategy-grid.html)
- sandbox/camptocamp/unhcr/examples/strategy-paging.html (copied) (copied from sandbox/vector-behavior/examples/strategy-paging.html)
- sandbox/camptocamp/unhcr/examples/stylemap.html (copied) (copied from sandbox/vector-behavior/examples/stylemap.html)
- sandbox/camptocamp/unhcr/examples/styles-rotation.html (copied) (copied from sandbox/vector-behavior/examples/styles-rotation.html)
- sandbox/camptocamp/unhcr/examples/styles-unique.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes/Bounds.js (modified) (3 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Control/NavigationHistory.js (modified) (2 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Control/OverviewMap.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Control/Permalink.js (modified) (2 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Control/ScaleLine.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Feature/Vector.js (modified) (4 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Format/GeoRSS.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Format/WKT.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Handler/Box.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/en.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/fr.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/nb.js (copied) (copied from sandbox/vector-behavior/lib/OpenLayers/Lang/nb.js)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/zh-TW.js (copied) (copied from sandbox/vector-behavior/lib/OpenLayers/Lang/zh-TW.js)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/GeoRSS.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector.js (modified) (14 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/WFS.js (modified) (4 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/WMS.js (modified) (2 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Map.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol.js (modified) (4 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/HTTP.js (modified) (8 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/SQL.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/SQL/GoogleGears.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/WFS/v1_0_0.js (modified) (3 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Protocol/WFSV.js (modified) (2 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Renderer/Elements.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy.js (modified) (3 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Autosave.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/BBOX.js (modified) (7 diffs)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Cluster.js (copied) (copied from sandbox/vector-behavior/lib/OpenLayers/Strategy/Cluster.js)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Composer.js (deleted)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Fixed.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/GreedySave.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Grid.js (copied) (copied from sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Paging.js (copied) (copied from sandbox/vector-behavior/lib/OpenLayers/Strategy/Paging.js)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Strategy/Save.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/lib/OpenLayers/Tile/WFS.js (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/BaseTypes.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Control/ScaleLine.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Format/WKT.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Layer/GeoRSS.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Layer/WFS.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Map.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/Protocol/HTTP.html (modified) (2 diffs)
- sandbox/camptocamp/unhcr/tests/Tile/WFS.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/tests/run-tests.html (modified) (1 diff)
- sandbox/camptocamp/unhcr/theme/default/img/navigation_history.png (copied) (copied from sandbox/vector-behavior/theme/default/img/navigation_history.png)
- sandbox/camptocamp/unhcr/theme/default/style.css (modified) (1 diff)
- sandbox/camptocamp/unhcr/tools/exampleparser.py (modified) (7 diffs)
- sandbox/camptocamp/unhcr/tools/oldot.py (copied) (copied from sandbox/vector-behavior/tools/oldot.py)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/camptocamp/unhcr/build/full.cfg
r7349 r7537 19 19 OpenLayers/Lang/fr.js 20 20 OpenLayers/Lang/it.js 21 OpenLayers/Lang/nb.js 21 22 OpenLayers/Lang/pt-BR.js 22 23 OpenLayers/Lang/sv-SE.js 24 OpenLayers/Lang/zh-TW.js sandbox/camptocamp/unhcr/build/library.cfg
r7349 r7537 52 52 OpenLayers/Lang/fr.js 53 53 OpenLayers/Lang/it.js 54 OpenLayers/Lang/nb.js 54 55 OpenLayers/Lang/pt-BR.js 55 56 OpenLayers/Lang/sv-SE.js 57 OpenLayers/Lang/zh-TW.js 56 58 59 sandbox/camptocamp/unhcr/build/lite.cfg
r7349 r7537 20 20 21 21 [exclude] 22 Firebug/firebug.js23 Firebug/firebugx.js24 OpenLayers/Lang/cs-CZ.js25 OpenLayers/Lang/de.js26 OpenLayers/Lang/en-CA.js27 OpenLayers/Lang/fr.js28 OpenLayers/Lang/it.js29 OpenLayers/Lang/pt-BR.js30 OpenLayers/Lang/sv-SE.js31 22 23 sandbox/camptocamp/unhcr/examples/editingtoolbar-outside.html
r7237 r7537 43 43 <body onload="init()"> 44 44 <h1 id="title">OpenLayers EditingToolbar Outside Viewport</h1> 45 <p id="shortdesc"> 46 Display an editing toolbar panel outside the map viewport. 47 </p> 45 48 <div id="map" class="smallmap"></div> 46 49 <div id="panel" class="olControlEditingToolbar"></div> sandbox/camptocamp/unhcr/examples/georss-flickr.html
r7237 r7537 47 47 style.addRules([rule, elseRule]); 48 48 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 52 66 styleMap: new OpenLayers.StyleMap({ 53 67 "default": style, … … 76 90 77 91 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 feature86 function createFeatureFromItem(item) {87 var feature = OpenLayers.Format.GeoRSS.prototype88 .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);102 92 } 103 93 </script> sandbox/camptocamp/unhcr/examples/intersects.html
r7237 r7537 162 162 <div id="leftcol"> 163 163 <h1 id="title">OpenLayers Geometry Intersection Example</h1> 164 <p id="shortdesc"> 165 Use of geometry.intersects method for testing geometry intersections. 166 </p> 164 167 <div id="map" class="smallmap"></div> 165 168 <div id="input"> sandbox/camptocamp/unhcr/examples/navigation-history.html
r7237 r7537 18 18 var map, nav, panel; 19 19 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() { 32 21 map = new OpenLayers.Map('map'); 33 22 … … 49 38 map.addLayer(layer); 50 39 map.zoomToMaxExtent(); 51 52 53 40 } 54 41 </script> sandbox/camptocamp/unhcr/examples/projected-map.html
r7237 r7537 48 48 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); 49 49 map.addControl(new OpenLayers.Control.LayerSwitcher()); 50 map.addControl(new OpenLayers.Control.ScaleLine()); 50 51 } 51 52 </script> sandbox/camptocamp/unhcr/examples/proxy.cgi
r7237 r7537 19 19 'labs.metacarta.com', 'world.freemap.in', 20 20 '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'] 23 23 24 24 method = os.environ["REQUEST_METHOD"] sandbox/camptocamp/unhcr/examples/rotate-features.html
r7237 r7537 78 78 var center = new OpenLayers.Feature.Vector(origin, null, style); 79 79 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); 86 86 } 87 87 sandbox/camptocamp/unhcr/examples/sld.html
r7237 r7537 92 92 <body onload="init()"> 93 93 <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> 94 97 <div id="map" class="smallmap"></div> 95 <p >This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD98 <p id="docs">This example uses a <a target="_blank" href="tasmania/sld-tasmania.xml">SLD 96 99 file</a> to style the vector features. To construct layers that use styles 97 100 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 42 42 var gsat = new OpenLayers.Layer.Google( 43 43 "Google Satellite", 44 {type: G_SATELLITE_MAP, 'sphericalMercator': true }44 {type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22} 45 45 ); 46 46 var ghyb = new OpenLayers.Layer.Google( … … 85 85 displayOutsideMaxExtent: true, 86 86 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 87 95 } 88 96 ); sandbox/camptocamp/unhcr/examples/styles-unique.html
r7241 r7537 93 93 94 94 <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). 100 97 </p> 101 98 sandbox/camptocamp/unhcr/lib/OpenLayers.js
r7349 r7537 193 193 "OpenLayers/Strategy/GreedySave.js", 194 194 "OpenLayers/Strategy/Autosave.js", 195 "OpenLayers/Strategy/Cluster.js", 196 "OpenLayers/Strategy/Paging.js", 195 197 "OpenLayers/Protocol.js", 196 198 "OpenLayers/Protocol/HTTP.js", sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes.js
r6829 r7537 135 135 } 136 136 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); 137 162 } 138 163 sandbox/camptocamp/unhcr/lib/OpenLayers/BaseTypes/Bounds.js
r7028 r7537 39 39 * {Number} Maximum vertical coordinate. 40 40 */ 41 top: null, 41 top: null, 42 43 /** 44 * Property: center 45 * {<OpenLayers.LonLat>} Use <getCenterLonLat>. 46 */ 47 center: null, 42 48 43 49 /** … … 216 222 */ 217 223 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; 220 230 }, 221 231 … … 282 292 } 283 293 } 294 this.center = null; 284 295 }, 285 296 sandbox/camptocamp/unhcr/lib/OpenLayers/Control/NavigationHistory.js
r6833 r7537 138 138 var previousOptions = { 139 139 trigger: OpenLayers.Function.bind(this.previousTrigger, this), 140 displayClass: this.displayClass + " Previous"140 displayClass: this.displayClass + " " + this.displayClass + "Previous" 141 141 }; 142 142 OpenLayers.Util.extend(previousOptions, this.previousOptions); … … 145 145 var nextOptions = { 146 146 trigger: OpenLayers.Function.bind(this.nextTrigger, this), 147 displayClass: this.displayClass + " Next"147 displayClass: this.displayClass + " " + this.displayClass + "Next" 148 148 }; 149 149 OpenLayers.Util.extend(nextOptions, this.nextOptions); sandbox/camptocamp/unhcr/lib/OpenLayers/Control/OverviewMap.js
r6810 r7537 496 496 // The base layer for overview map needs to be in the same projection 497 497 // 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') { 499 499 if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) { 500 500 alert(OpenLayers.i18n("sameProjection")); sandbox/camptocamp/unhcr/lib/OpenLayers/Control/Permalink.js
r7304 r7537 154 154 155 155 params.layers = ''; 156 for (var i=0; i< this.map.layers.length; i++) {156 for (var i=0; i < this.map.layers.length; i++) { 157 157 var layer = this.map.layers[i]; 158 158 … … 165 165 166 166 var href = this.base; 167 if ( href.indexOf('?') != -1 ){167 if (href.indexOf('?') != -1) { 168 168 href = href.substring( 0, href.indexOf('?') ); 169 169 } sandbox/camptocamp/unhcr/lib/OpenLayers/Control/ScaleLine.js
r6727 r7537 154 154 } 155 155 156 var curMapUnits = this.map. units;156 var curMapUnits = this.map.getUnits(); 157 157 var inches = OpenLayers.INCHES_PER_UNIT; 158 158 sandbox/camptocamp/unhcr/lib/OpenLayers/Feature/Vector.js
r7304 r7537 81 81 [null, null, attributes]); 82 82 this.lonlat = null; 83 this.geometry = geometry ;83 this.geometry = geometry ? geometry : null; 84 84 this.state = null; 85 85 this.attributes = {}; … … 207 207 } 208 208 return atPoint; 209 },210 211 /**212 * Method: getVertices213 * Returns all the vertices of the geometry.214 *215 * Return:216 * {Array(<OpenLayers.Geometry.Point>)} Vertices217 */218 getVertices: function() {219 if (this.geometry) {220 return this.geometry.getVertices();221 } else {222 return [];223 }224 },225 226 /**227 * Method: getEdges228 * Returns all the edges of the geometry.229 *230 * Return:231 * {Array(<OpenLayers.Geometry.LineString>)} Edges232 */233 getEdges: function() {234 if (this.geometry) {235 return this.geometry.getEdges();236 } else {237 return [];238 }239 209 }, 240 210 … … 346 316 hoverPointUnit: "%", 347 317 pointerEvents: "visiblePainted", 348 cursor: " "318 cursor: "inherit" 349 319 }, 350 320 'select': { … … 382 352 hoverPointUnit: "%", 383 353 pointerEvents: "visiblePainted", 384 cursor: " "354 cursor: "inherit" 385 355 } 386 356 }; sandbox/camptocamp/unhcr/lib/OpenLayers/Format/GeoRSS.js
r6833 r7537 224 224 getChildValue: function(node, nsuri, name, def) { 225 225 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 { 229 231 value = (def == undefined) ? "" : def; 230 232 } sandbox/camptocamp/unhcr/lib/OpenLayers/Format/WKT.js
r5614 r7537 68 68 features.geometry.transform(this.externalProjection, 69 69 this.internalProjection); 70 } else if (features && typeof features == "object") { 70 } else if (features && 71 type != "geometrycollection" && 72 typeof features == "object") { 71 73 for (var i = 0; i < features.length; i++) { 72 74 var component = features[i]; sandbox/camptocamp/unhcr/lib/OpenLayers/Handler/Box.js
r5614 r7537 85 85 */ 86 86 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); 89 91 this.zoomBox.style.width = Math.max(1, deltaX) + "px"; 90 92 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"; 97 95 }, 98 96 sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/en.js
r6313 r7537 76 76 "in the layer switcher in the upper-right corner.<br><br>" + 77 77 "Most likely, this is because the ${layerLib} library " + 78 "script was eithernot correctly included.<br><br>" +78 "script was not correctly included.<br><br>" + 79 79 "Developers: For help getting this working correctly, " + 80 80 "<a href='http://trac.openlayers.org/wiki/${layerLib}' " + sandbox/camptocamp/unhcr/lib/OpenLayers/Lang/fr.js
r6313 r7537 15 15 OpenLayers.Lang.fr = { 16 16 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': '' 18 120 19 121 }; sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/GeoRSS.js
r7349 r7537 122 122 OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments); 123 123 if(this.visibility && !this.loaded){ 124 this.events.triggerEvent("loadstart");125 124 this.loadRSS(); 126 125 } sandbox/camptocamp/unhcr/lib/OpenLayers/Layer/Vector.js
r7304 r7537 39 39 * - *beforefeatureadded* Triggered before a feature is added. Listeners 40 40 * 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. 42 47 * - *featureadded* Triggered after a feature is added. The event 43 48 * object passed to listeners will have a *feature* property with a … … 49 54 * will receive an object with a *feature* property referencing the 50 55 * 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. 51 59 * - *featureremoved* Triggerd after a feature is removed. The event 52 60 * object passed to listeners will have a *feature* property with a … … 70 78 * Listeners will receive an object with a *feature* property referencing 71 79 * 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", 74 85 "beforefeatureremoved", "featureremoved", "featuresremoved", 75 "featureselected", "featureunselected", 76 "beforefeaturemodified", "featuremodified", "afterfeaturemodified"], 86 "featureserased", "featureselected", "featureunselected", 87 "beforefeaturemodified", "featuremodified", "afterfeaturemodified", 88 "refresh"], 77 89 78 90 /** … … 101 113 */ 102 114 features: null, 115 116 /** 117 * APIProperty: featureMap 118 * {Object} A feature fid to <OpenLayers.Feature.Vector> feature map. 119 */ 120 featureMap: null, 103 121 104 122 /** … … 194 212 195 213 this.features = []; 214 this.featureMap = {}; 196 215 this.selectedFeatures = []; 197 216 … … 216 235 */ 217 236 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
