Compare commits

..

1 Commits

Author SHA1 Message Date
crschmidt
9011c8ca0a Tag 2.4-RC2.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4-rc2@3089 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-20 01:29:54 +00:00
116 changed files with 484 additions and 643 deletions

View File

@@ -2,7 +2,7 @@
OpenLayers.js -- OpenLayers Map Viewer Library OpenLayers.js -- OpenLayers Map Viewer Library
Copyright 2005-2006 MetaCarta, Inc., released under the BSD license. Copyright 2005-2006 MetaCarta, Inc., released under a BSD license.
Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt
for the full text of the license. for the full text of the license.

View File

@@ -1,7 +1,6 @@
OpenLayers contributors: OpenLayers contributors:
Howard Butler Howard Butler
Bertil Chaupis Bertil Chaupis
John Cole
Jeff Dege Jeff Dege
Schuyler Erle Schuyler Erle
Christian López Espínola Christian López Espínola

View File

@@ -2,7 +2,7 @@
<head> <head>
<style type="text/css"> <style type="text/css">
#map { #map {
width: 45%; width: 512px;
height: 350px; height: 350px;
border: 1px solid gray; border: 1px solid gray;
} }
@@ -42,8 +42,8 @@
</head> </head>
<body onload="init()"> <body onload="init()">
<h1>OpenLayers Draw Point Example</h1> <h1>OpenLayers Draw Point Example</h1>
<div style="float:right;width:50%"> <div style="float:right">
<textarea id="gml" style="width:100%" rows="30"></textarea> <textarea id="gml" cols="80" rows="30"></textarea>
</div> </div>
<div id="map"></div> <div id="map"></div>
</body> </body>

View File

@@ -1,54 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 650px;
height: 550px;
border: 1px solid black;
}
</style>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAKsGpqSOKkB-Ih2JopAmNbBTv_3ENzieGiNBMV02NiUJp8KZGIRTQWhul8K0wiNOHDxOF0-W2RmFoRg'></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
function init(){
// Variables
var map = new OpenLayers.Map('map', { controls: [] });
var lon = 35;
var lat = -6;
var zoom = 6;
var map, layer;
// Map Controls
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.MouseToolbar());
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
map.addControl(new OpenLayers.Control.MousePosition());
// Map Layers
var GMapsSat = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
var GMapsHybr = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_TYPE, 'maxZoomLevel':18} );
var GMapsStreets = new OpenLayers.Layer.Google( "Google Steets" , {type: G_NORMAL_MAP, 'maxZoomLevel':18} );
var MarkersLayer2 = new OpenLayers.Layer.Text( "Region info", {location: "outOfRangeMarkers.txt", maxResolution: 0.02});
// Add Layers
map.addLayers([GMapsHybr, GMapsStreets, GMapsSat, MarkersLayer2]);
// Visual
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
if (!map.getCenter()) map.zoomToMaxExtent();
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -1,3 +0,0 @@
point title description icon
-4.14,37.90 Kilimanjaro Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png
-3.24,34.35 Shinyanga Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png

View File

@@ -69,7 +69,7 @@
zb = new OpenLayers.Control.ZoomBox(); zb = new OpenLayers.Control.ZoomBox();
var panel = new OpenLayers.Control.Panel({defaultControl: zb}); panel = new OpenLayers.Control.Panel({defaultControl: zb});
panel.addControls([ panel.addControls([
new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.MouseDefaults(),
zb, zb,

View File

@@ -47,7 +47,7 @@
popup = new OpenLayers.Popup.Anchored("chicken", popup = new OpenLayers.Popup.Anchored("chicken",
new OpenLayers.LonLat(5,40), new OpenLayers.LonLat(5,40),
new OpenLayers.Size(200,200), new OpenLayers.Size(200,200),
"example popup", true); "example popup");
map.addPopup(popup); map.addPopup(popup);
} }
@@ -69,17 +69,8 @@
} }
function mousedown(evt) { function mousedown(evt) {
// check to see if the popup was hidden by the close box
// if so, then destroy it before continuing
if (popup != null) {
if (!popup.visible()) {
markers.map.removePopup(popup);
popup.destroy();
popup = null;
}
}
if (popup == null) { if (popup == null) {
popup = feature.createPopup(true); popup = feature.createPopup();
popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>"); popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
popup.setBackgroundColor("yellow"); popup.setBackgroundColor("yellow");
popup.setOpacity(0.7); popup.setOpacity(0.7);

View File

@@ -17,23 +17,11 @@
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
style_blue.strokeColor = "blue";
style_blue.fillColor = "blue";
var style_green = {
strokeColor: "#00FF00",
strokeOpacity: 1,
strokeWidth: 3,
pointRadius: 6,
pointerEvents: "visiblePainted"
};
var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry"); var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
// create a point feature // create a point feature
var point = new OpenLayers.Geometry.Point(-111.04, 45.68); var point = new OpenLayers.Geometry.Point(-111.04, 45.68);
var pointFeature = new OpenLayers.Feature.Vector(point,null,style_blue); var pointFeature = new OpenLayers.Feature.Vector(point);
// create a line feature from a list of points // create a line feature from a list of points
var pointList = []; var pointList = [];
@@ -44,7 +32,7 @@
pointList.push(newPoint); pointList.push(newPoint);
} }
var lineFeature = new OpenLayers.Feature.Vector( var lineFeature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.LineString(pointList),null,style_green); new OpenLayers.Geometry.LineString(pointList));
// create a polygon feature from a linear ring of points // create a polygon feature from a linear ring of points
var pointList = []; var pointList = [];
@@ -71,9 +59,5 @@
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="map"></div> <div id="map"></div>
<p>This example shows drawing simple vector features -- point, line, polygon
in different styles, created 'manually', by constructing the entire style
object, via 'copy', extending the default style object, and by
inheriting the default style from the layer.</p>
</body> </body>
</html> </html>

View File

@@ -78,7 +78,7 @@
} }
function displayWKT(feature) { function displayWKT(feature) {
var str = wkt.write(feature); var str = wkt.write(feature.geometry);
// not a good idea in general, just for this demo // not a good idea in general, just for this demo
str = str.replace(/,/g, ', '); str = str.replace(/,/g, ', ');
document.getElementById('info').innerHTML = str; document.getElementById('info').innerHTML = str;
@@ -86,18 +86,19 @@
function parseWKT() { function parseWKT() {
var element = document.getElementById('wkt'); var element = document.getElementById('wkt');
var features = wkt.read(element.value); var collection = wkt.read(element.value);
var bounds; var bounds;
if(features) { if(collection) {
if(features.constructor != Array) { if(collection.constructor != Array) {
features = [features]; collection = [collection];
} }
for(var i=0; i<features.length; ++i) { var features = [];
for(var i=0; i<collection.length; ++i) {
features.push(new OpenLayers.Feature.Vector(collection[i]));
if (!bounds) { if (!bounds) {
bounds = features[i].geometry.getBounds(); bounds = collection[i].getBounds();
} else {
bounds.extend(features[i].geometry.getBounds());
} }
bounds.extend(collection[i].getBounds());
} }
vectors.addFeatures(features); vectors.addFeatures(features);

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -31,9 +31,8 @@ OpenLayers.Class = {
// so the util.extend() doesnt copy it over. we do it manually. // so the util.extend() doesnt copy it over. we do it manually.
// //
// to be revisited in 3.0 // to be revisited in 3.0
// //
if((arguments[i].hasOwnProperty && arguments[i].hasOwnProperty('toString')) || if (arguments[i].hasOwnProperty('toString')) {
(!arguments[i].hasOwnProperty && arguments[i].toString)) {
proto.toString = arguments[i].toString; proto.toString = arguments[i].toString;
} }
} }

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
/** /**
@@ -180,8 +180,7 @@ OpenLayers.Control.OverviewMap.prototype =
this.elementEvents.register('dblclick', this, function(e) { this.elementEvents.register('dblclick', this, function(e) {
OpenLayers.Event.stop(e); OpenLayers.Event.stop(e);
}); });
this.rectEvents = new OpenLayers.Events(this, this.extentRectangle, this.rectEvents = new OpenLayers.Events(this, this.extentRectangle);
null, true);
this.rectEvents.register('mouseout', this, this.rectMouseOut); this.rectEvents.register('mouseout', this, this.rectMouseOut);
this.rectEvents.register('mousedown', this, this.rectMouseDown); this.rectEvents.register('mousedown', this, this.rectMouseDown);
this.rectEvents.register('mousemove', this, this.rectMouseMove); this.rectEvents.register('mousemove', this, this.rectMouseMove);
@@ -521,8 +520,8 @@ OpenLayers.Control.OverviewMap.prototype =
this.ovmap.size.w - this.wComp); this.ovmap.size.w - this.wComp);
this.extentRectangle.style.top = parseInt(top) + 'px'; this.extentRectangle.style.top = parseInt(top) + 'px';
this.extentRectangle.style.left = parseInt(left) + 'px'; this.extentRectangle.style.left = parseInt(left) + 'px';
this.extentRectangle.style.height = parseInt(Math.max(bottom - top, 0))+ 'px'; this.extentRectangle.style.height = parseInt(bottom - top)+ 'px';
this.extentRectangle.style.width = parseInt(Math.max(right - left, 0)) + 'px'; this.extentRectangle.style.width = parseInt(right - left) + 'px';
}, },
/** /**

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -129,8 +129,6 @@ OpenLayers.Control.Panel.prototype =
// Give each control a panel_div which will be used later. // Give each control a panel_div which will be used later.
// Access to this div is via the panel_div attribute of the // Access to this div is via the panel_div attribute of the
// control added to the panel. // control added to the panel.
// Also, stop mousedowns and clicks, but don't stop mouseup,
// since they need to pass through.
for (var i = 0; i < controls.length; i++) { for (var i = 0; i < controls.length; i++) {
var element = document.createElement("div"); var element = document.createElement("div");
var textNode = document.createTextNode(" "); var textNode = document.createTextNode(" ");
@@ -139,6 +137,8 @@ OpenLayers.Control.Panel.prototype =
this.onClick.bind(this, controls[i])); this.onClick.bind(this, controls[i]));
OpenLayers.Event.observe(controls[i].panel_div, "mousedown", OpenLayers.Event.observe(controls[i].panel_div, "mousedown",
OpenLayers.Event.stop.bindAsEventListener()); OpenLayers.Event.stop.bindAsEventListener());
OpenLayers.Event.observe(controls[i].panel_div, "mouseup",
OpenLayers.Event.stop.bindAsEventListener());
} }
if (this.map) { // map.addControl() has already been called on the panel if (this.map) { // map.addControl() has already been called on the panel

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -121,7 +121,6 @@ OpenLayers.Feature.prototype= {
}, },
/** /**
* @param {Boolean} closeBox create popup with closebox or not
* @returns A Popup Object created from the 'lonlat', 'popupSize', * @returns A Popup Object created from the 'lonlat', 'popupSize',
* and 'popupContentHTML' properties set in this.data. It uses * and 'popupContentHTML' properties set in this.data. It uses
* this.marker.icon as default anchor. * this.marker.icon as default anchor.
@@ -133,7 +132,7 @@ OpenLayers.Feature.prototype= {
* *
* @type OpenLayers.Popup.AnchoredBubble * @type OpenLayers.Popup.AnchoredBubble
*/ */
createPopup: function(closeBox) { createPopup: function() {
if (this.lonlat != null) { if (this.lonlat != null) {
@@ -144,7 +143,7 @@ OpenLayers.Feature.prototype= {
this.lonlat, this.lonlat,
this.data.popupSize, this.data.popupSize,
this.data.popupContentHTML, this.data.popupContentHTML,
anchor, closeBox); anchor);
} }
return this.popup; return this.popup;
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -84,11 +84,13 @@ OpenLayers.Format.GML.prototype =
var feature = new OpenLayers.Feature.Vector(); var feature = new OpenLayers.Feature.Vector();
if (xmlNode.firstChild.attributes && xmlNode.firstChild.attributes['fid']) {
feature.fid = xmlNode.firstChild.attributes['fid'].nodeValue;
}
// match MultiPolygon // match MultiPolygon
if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon").length != 0) { if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon").length != 0) {
var multipolygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon")[0]; var multipolygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon")[0];
feature.fid = multipolygon.parentNode.parentNode.getAttribute('fid');
geom = new OpenLayers.Geometry.MultiPolygon(); geom = new OpenLayers.Geometry.MultiPolygon();
var polygons = OpenLayers.Ajax.getElementsByTagNameNS(multipolygon, var polygons = OpenLayers.Ajax.getElementsByTagNameNS(multipolygon,
this.gmlns, "gml", "Polygon"); this.gmlns, "gml", "Polygon");
@@ -102,7 +104,6 @@ OpenLayers.Format.GML.prototype =
this.gmlns, "gml", "MultiLineString").length != 0) { this.gmlns, "gml", "MultiLineString").length != 0) {
var multilinestring = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, var multilinestring = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,
this.gmlns, "gml", "MultiLineString")[0]; this.gmlns, "gml", "MultiLineString")[0];
feature.fid = multilinestring.parentNode.parentNode.getAttribute('fid');
geom = new OpenLayers.Geometry.MultiLineString(); geom = new OpenLayers.Geometry.MultiLineString();
var lineStrings = OpenLayers.Ajax.getElementsByTagNameNS(multilinestring, this.gmlns, "gml", "LineString"); var lineStrings = OpenLayers.Ajax.getElementsByTagNameNS(multilinestring, this.gmlns, "gml", "LineString");
@@ -121,7 +122,6 @@ OpenLayers.Format.GML.prototype =
this.gmlns, "gml", "MultiPoint").length != 0) { this.gmlns, "gml", "MultiPoint").length != 0) {
var multiPoint = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, var multiPoint = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,
this.gmlns, "gml", "MultiPoint")[0]; this.gmlns, "gml", "MultiPoint")[0];
feature.fid = multiPoint.parentNode.parentNode.getAttribute('fid');
geom = new OpenLayers.Geometry.MultiPoint(); geom = new OpenLayers.Geometry.MultiPoint();
@@ -138,7 +138,6 @@ OpenLayers.Format.GML.prototype =
this.gmlns, "gml", "Polygon").length != 0) { this.gmlns, "gml", "Polygon").length != 0) {
var polygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, var polygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,
this.gmlns, "gml", "Polygon")[0]; this.gmlns, "gml", "Polygon")[0];
feature.fid = polygon.parentNode.parentNode.getAttribute('fid');
geom = this.parsePolygonNode(polygon); geom = this.parsePolygonNode(polygon);
} }
@@ -147,8 +146,6 @@ OpenLayers.Format.GML.prototype =
this.gmlns, "gml", "LineString").length != 0) { this.gmlns, "gml", "LineString").length != 0) {
var lineString = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, var lineString = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,
this.gmlns, "gml", "LineString")[0]; this.gmlns, "gml", "LineString")[0];
feature.fid = lineString.parentNode.parentNode.getAttribute('fid');
p = this.parseCoords(lineString); p = this.parseCoords(lineString);
if (p.points) { if (p.points) {
geom = new OpenLayers.Geometry.LineString(p.points); geom = new OpenLayers.Geometry.LineString(p.points);
@@ -160,7 +157,6 @@ OpenLayers.Format.GML.prototype =
this.gmlns, "gml", "Point").length != 0) { this.gmlns, "gml", "Point").length != 0) {
var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,
this.gmlns, "gml", "Point")[0]; this.gmlns, "gml", "Point")[0];
feature.fid = point.parentNode.parentNode.getAttribute('fid');
p = this.parseCoords(point); p = this.parseCoords(point);
if (p.points) { if (p.points) {

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -97,10 +97,10 @@ OpenLayers.Format.GeoRSS.prototype =
var path = ""; var path = "";
if (points) { if (points) {
for (var i = 0; i < points.length; i++) { for (var i = 0; i < points.length; i++) {
path += points[i].y + " " + points[i].x + " "; path += points[i].lat + " " + points[i].lon + " ";
} }
} else { } else {
path += geometry.y + " " + geometry.x + " "; path += geometry.lat + " " + geometry.lon + " ";
} }
return document.createTextNode(path); return document.createTextNode(path);
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -25,41 +25,38 @@ OpenLayers.Format.WKT.prototype =
}, },
/** /**
* Deserialize a WKT string and return an OpenLayers.Feature.Vector or an * Deserialize a WKT string and return an OpenLayers.Geometry or an array
* array of OpenLayers.Feature.Vector. Supports WKT for POINT, MULTIPOINT, * of OpenLayers.Geometry. Supports WKT for POINT, MULTIPOINT, LINESTRING,
* LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and * MULTILINESTRING, POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION.
* GEOMETRYCOLLECTION.
* @param {String} wkt A WKT string * @param {String} wkt A WKT string
* @returns {OpenLayers.Feature.Vector|Array} A feature or array of * @returns {OpenLayers.Geometry|Array} A geometry or array of geometries
* features for * for GEOMETRYCOLLECTION WKT.
* GEOMETRYCOLLECTION WKT.
*/ */
read: function(wkt) { read: function(wkt) {
var features, type, str; var geometry, type, str;
var matches = this.regExes.typeStr.exec(wkt); var matches = this.regExes.typeStr.exec(wkt);
if(matches) { if(matches) {
type = matches[1].toLowerCase(); type = matches[1].toLowerCase();
str = matches[2]; str = matches[2];
if(this.parse[type]) { if(this.parse[type]) {
features = this.parse[type].apply(this, [str]); geometry = this.parse[type].apply(this, [str]);
} }
} }
return features; return geometry;
}, },
/** /**
* Serialize a feature or array of features into a WKT string. * Serialize a geometry or array of geometries into a WKT string.
* @param {OpenLayers.Feature.Vector|Array} features A feature or array of * @param {OpenLayers.Geometry|Array} geom A geometry or array of geometries
* features
* @returns {String} The WKT string representation of the input geometries * @returns {String} The WKT string representation of the input geometries
*/ */
write: function(features) { write: function(geom) {
var collection, geometry, type, data, isCollection; var collection, geometry, type, data, isCollection;
if(features.constructor == Array) { if(geom.constructor == Array) {
collection = features; collection = geom;
isCollection = true; isCollection = true;
} else { } else {
collection = [features]; collection = [geom];
isCollection = false; isCollection = false;
} }
var pieces = []; var pieces = [];
@@ -70,7 +67,7 @@ OpenLayers.Format.WKT.prototype =
if(isCollection && i>0) { if(isCollection && i>0) {
pieces.push(','); pieces.push(',');
} }
geometry = collection[i].geometry; geometry = collection[i];
type = geometry.CLASS_NAME.split('.')[2].toLowerCase(); type = geometry.CLASS_NAME.split('.')[2].toLowerCase();
if(!this.extract[type]) { if(!this.extract[type]) {
return null; return null;
@@ -181,57 +178,47 @@ OpenLayers.Format.WKT.prototype =
*/ */
parse: { parse: {
/** /**
* Return point feature given a point WKT fragment. * Return point geometry given a point WKT fragment.
* @param {String} str A WKT fragment representing the point * @param {String} str A WKT fragment representing the point
* @returns {OpenLayers.Feature.Vector} A point feature * @returns {OpenLayers.Geometry.Point} A point geometry
* @private
*/ */
'point': function(str) { 'point': function(str) {
var coords = str.trim().split(this.regExes.spaces); var coords = str.trim().split(this.regExes.spaces);
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.Point(coords[0], coords[1]);
new OpenLayers.Geometry.Point(coords[0], coords[1])
);
}, },
/** /**
* Return a multipoint feature given a multipoint WKT fragment. * Return a multipoint geometry given a multipoint WKT fragment.
* @param {String} A WKT fragment representing the multipoint * @param {String} A WKT fragment representing the multipoint
* @returns {OpenLayers.Feature.Vector} A multipoint feature * @returns {OpenLayers.Geometry.MultiPoint} A multipoint geometry
* @private
*/ */
'multipoint': function(str) { 'multipoint': function(str) {
var points = str.trim().split(','); var points = str.trim().split(',');
var components = []; var components = [];
for(var i=0; i<points.length; ++i) { for(var i=0; i<points.length; ++i) {
components.push(this.parse.point.apply(this, [points[i]]).geometry); components.push(this.parse.point.apply(this, [points[i]]));
} }
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.MultiPoint(components);
new OpenLayers.Geometry.MultiPoint(components)
);
}, },
/** /**
* Return a linestring feature given a linestring WKT fragment. * Return a linestring geometry given a linestring WKT fragment.
* @param {String} A WKT fragment representing the linestring * @param {String} A WKT fragment representing the linestring
* @returns {OpenLayers.Feature.Vector} A linestring feature * @returns {OpenLayers.Geometry.LineString} A linestring geometry
* @private
*/ */
'linestring': function(str) { 'linestring': function(str) {
var points = str.trim().split(','); var points = str.trim().split(',');
var components = []; var components = [];
for(var i=0; i<points.length; ++i) { for(var i=0; i<points.length; ++i) {
components.push(this.parse.point.apply(this, [points[i]]).geometry); components.push(this.parse.point.apply(this, [points[i]]));
} }
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.LineString(components);
new OpenLayers.Geometry.LineString(components)
);
}, },
/** /**
* Return a multilinestring feature given a multilinestring WKT fragment. * Return a multilinestring geometry given a multilinestring WKT fragment.
* @param {String} A WKT fragment representing the multilinestring * @param {String} A WKT fragment representing the multilinestring
* @returns {OpenLayers.Feature.Vector} A multilinestring feature * @returns {OpenLayers.Geometry.LineString} A multilinestring geometry
* @private
*/ */
'multilinestring': function(str) { 'multilinestring': function(str) {
var line; var line;
@@ -239,18 +226,15 @@ OpenLayers.Format.WKT.prototype =
var components = []; var components = [];
for(var i=0; i<lines.length; ++i) { for(var i=0; i<lines.length; ++i) {
line = lines[i].replace(this.regExes.trimParens, '$1'); line = lines[i].replace(this.regExes.trimParens, '$1');
components.push(this.parse.linestring.apply(this, [line]).geometry); components.push(this.parse.linestring.apply(this, [line]));
} }
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.MultiLineString(components);
new OpenLayers.Geometry.MultiLineString(components)
);
}, },
/** /**
* Return a polygon feature given a polygon WKT fragment. * Return a polygon geometry given a polygon WKT fragment.
* @param {String} A WKT fragment representing the polygon * @param {String} A WKT fragment representing the polygon
* @returns {OpenLayers.Feature.Vector} A polygon feature * @returns {OpenLayers.Geometry.Polygon} A polygon geometry
* @private
*/ */
'polygon': function(str) { 'polygon': function(str) {
var ring, linestring, linearring; var ring, linestring, linearring;
@@ -258,20 +242,17 @@ OpenLayers.Format.WKT.prototype =
var components = []; var components = [];
for(var i=0; i<rings.length; ++i) { for(var i=0; i<rings.length; ++i) {
ring = rings[i].replace(this.regExes.trimParens, '$1'); ring = rings[i].replace(this.regExes.trimParens, '$1');
linestring = this.parse.linestring.apply(this, [ring]).geometry; linestring = this.parse.linestring.apply(this, [ring]);
linearring = new OpenLayers.Geometry.LinearRing(linestring.components) linearring = new OpenLayers.Geometry.LinearRing(linestring.components);
components.push(linearring); components.push(linearring);
} }
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.Polygon(components);
new OpenLayers.Geometry.Polygon(components)
);
}, },
/** /**
* Return a multipolygon feature given a multipolygon WKT fragment. * Return a multipolygon geometry given a multipolygon WKT fragment.
* @param {String} A WKT fragment representing the multipolygon * @param {String} A WKT fragment representing the multipolygon
* @returns {OpenLayers.Feature.Vector} A multipolygon feature * @returns {OpenLayers.Geometry.MultiPolygon} A multipolygon geometry
* @private
*/ */
'multipolygon': function(str) { 'multipolygon': function(str) {
var polygon; var polygon;
@@ -279,18 +260,15 @@ OpenLayers.Format.WKT.prototype =
var components = []; var components = [];
for(var i=0; i<polygons.length; ++i) { for(var i=0; i<polygons.length; ++i) {
polygon = polygons[i].replace(this.regExes.trimParens, '$1'); polygon = polygons[i].replace(this.regExes.trimParens, '$1');
components.push(this.parse.polygon.apply(this, [polygon]).geometry); components.push(this.parse.polygon.apply(this, [polygon]));
} }
return new OpenLayers.Feature.Vector( return new OpenLayers.Geometry.MultiPolygon(components);
new OpenLayers.Geometry.MultiPolygon(components)
);
}, },
/** /**
* Return an array of features given a geometrycollection WKT fragment. * Return an array of geometries given a geometrycollection WKT fragment.
* @param {String} A WKT fragment representing the geometrycollection * @param {String} A WKT fragment representing the geometrycollection
* @returns {Array} An array of OpenLayers.Feature.Vector * @returns {Array} An array of OpenLayers.Geometry
* @private
*/ */
'geometrycollection': function(str) { 'geometrycollection': function(str) {
// separate components of the collection with | // separate components of the collection with |

View File

@@ -1,11 +1,10 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
/** /**
* @class * @class
* @requires OpenLayers/Format/WKT.js * @requires OpenLayers/Format/WKT.js
* @requires OpenLayers/Feature/Vector.js
*/ */
OpenLayers.Geometry = OpenLayers.Class.create(); OpenLayers.Geometry = OpenLayers.Class.create();
OpenLayers.Geometry.prototype = { OpenLayers.Geometry.prototype = {
@@ -151,9 +150,7 @@ OpenLayers.Geometry.prototype = {
* @type String * @type String
*/ */
toString: function() { toString: function() {
return OpenLayers.Format.WKT.prototype.write( return OpenLayers.Format.WKT.prototype.write(this);
new OpenLayers.Feature.Vector(this)
);
}, },
/** @final @type String */ /** @final @type String */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -286,8 +286,6 @@ OpenLayers.Layer.prototype = {
if (!this.isBaseLayer) { if (!this.isBaseLayer) {
this.inRange = this.calculateInRange(); this.inRange = this.calculateInRange();
var show = ((this.visibility) && (this.inRange));
this.div.style.display = show ? "" : "none";
} }
// deal with gutters // deal with gutters
@@ -608,15 +606,13 @@ OpenLayers.Layer.prototype = {
if (viewPortPx != null) { if (viewPortPx != null) {
var size = this.map.getSize(); var size = this.map.getSize();
var center = this.map.getCenter(); var center = this.map.getCenter();
if (center) { var res = this.map.getResolution();
var res = this.map.getResolution();
var delta_x = viewPortPx.x - (size.w / 2); var delta_x = viewPortPx.x - (size.w / 2);
var delta_y = viewPortPx.y - (size.h / 2); var delta_y = viewPortPx.y - (size.h / 2);
lonlat = new OpenLayers.LonLat(center.lon + delta_x * res , lonlat = new OpenLayers.LonLat(center.lon + delta_x * res ,
center.lat - delta_y * res); center.lat - delta_y * res);
} // else { DEBUG STATEMENT }
} }
return lonlat; return lonlat;
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -11,7 +11,6 @@
* @class * @class
* *
* @requires OpenLayers/Layer.js * @requires OpenLayers/Layer.js
* @requires OpenLayers/Tile/Image.js
*/ */
OpenLayers.Layer.Image = OpenLayers.Class.create(); OpenLayers.Layer.Image = OpenLayers.Class.create();
OpenLayers.Layer.Image.prototype = OpenLayers.Layer.Image.prototype =

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
// @requires OpenLayers/Layer/Grid.js // @requires OpenLayers/Layer/Grid.js

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -21,15 +21,6 @@ OpenLayers.Layer.Markers.prototype =
/** internal marker list /** internal marker list
* @type Array(OpenLayers.Marker) */ * @type Array(OpenLayers.Marker) */
markers: null, markers: null,
/** internal state of drawing. This is a workaround for the fact
* that the map does not call moveTo with a zoomChanged when the
* map is first starting up. This lets us catch the case where we
* have *never* drawn the layer, and draw it even if the zoom hasn't
* changed.
* @type Boolean */
drawn: false,
/** /**
* @constructor * @constructor
@@ -60,9 +51,8 @@ OpenLayers.Layer.Markers.prototype =
moveTo:function(bounds, zoomChanged, dragging) { moveTo:function(bounds, zoomChanged, dragging) {
OpenLayers.Layer.prototype.moveTo.apply(this, arguments); OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
if (zoomChanged || !this.drawn) { if (zoomChanged) {
this.redraw(); this.redraw();
this.drawn = true;
} }
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD licence. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD licence.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -97,7 +97,8 @@ OpenLayers.Layer.Vector.prototype =
destroy: function() { destroy: function() {
OpenLayers.Layer.prototype.destroy.apply(this, arguments); OpenLayers.Layer.prototype.destroy.apply(this, arguments);
this.destroyFeatures(); // HACK HACK -- I believe we should be iterating and
// calling feature[i].destroy() here.
this.features = null; this.features = null;
this.selectedFeatures = null; this.selectedFeatures = null;
if (this.renderer) { if (this.renderer) {
@@ -246,15 +247,7 @@ OpenLayers.Layer.Vector.prototype =
var feature = features[i]; var feature = features[i];
this.features = OpenLayers.Util.removeItem(this.features, feature); this.features = OpenLayers.Util.removeItem(this.features, feature);
if (feature.geometry) { this.renderer.eraseGeometry(feature.geometry);
this.renderer.eraseGeometry(feature.geometry);
}
//in the case that this feature is one of the selected features,
// remove it from that array as well.
if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){
OpenLayers.Util.removeItem(this.selectedFeatures, feature);
}
} }
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -92,9 +92,7 @@ OpenLayers.Layer.WMS.Untiled.prototype =
obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]); obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);
// copy/set any non-init, non-simple values here // copy/set any non-init, non-simple values here
obj.tile = null;
return obj; return obj;
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -199,25 +199,11 @@ OpenLayers.Map.prototype = {
// only append link stylesheet if the theme property is set // only append link stylesheet if the theme property is set
if(this.theme) { if(this.theme) {
// check existing links for equivalent url var cssNode = document.createElement('link');
var addNode = true; cssNode.setAttribute('rel', 'stylesheet');
var nodes = document.getElementsByTagName('link'); cssNode.setAttribute('type', 'text/css');
for(var i=0; i<nodes.length; ++i) { cssNode.setAttribute('href', this.theme);
if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href, document.getElementsByTagName('head')[0].appendChild(cssNode);
this.theme)) {
addNode = false;
break;
}
}
// only add a new node if one with an equivalent url hasn't already
// been added
if(addNode) {
var cssNode = document.createElement('link');
cssNode.setAttribute('rel', 'stylesheet');
cssNode.setAttribute('type', 'text/css');
cssNode.setAttribute('href', this.theme);
document.getElementsByTagName('head')[0].appendChild(cssNode);
}
} }
this.layers = []; this.layers = [];

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -45,9 +45,6 @@ OpenLayers.Popup.prototype = {
/** @type DOMElement */ /** @type DOMElement */
contentDiv:null, contentDiv:null,
/** @type DOMElement */
groupDiv:null,
/** @type int */ /** @type int */
padding: 5, padding: 5,
@@ -87,18 +84,13 @@ OpenLayers.Popup.prototype = {
this.div = OpenLayers.Util.createDiv(this.id, null, null, this.div = OpenLayers.Util.createDiv(this.id, null, null,
null, null, null, "hidden"); null, null, null, "hidden");
this.div.className = 'olPopup'; this.div.className = 'olPopup';
this.groupDiv = OpenLayers.Util.createDiv(null, null, null,
null, "relative", null,
"hidden");
var id = this.div.id + "_contentDiv"; var id = this.div.id + "_contentDiv";
this.contentDiv = OpenLayers.Util.createDiv(id, null, this.size.clone(), this.contentDiv = OpenLayers.Util.createDiv(id, null, this.size.clone(),
null, "relative", null, null, "relative", null,
"hidden"); "hidden");
this.contentDiv.className = 'olPopupContent'; this.contentDiv.className = 'olPopupContent';
this.groupDiv.appendChild(this.contentDiv); this.div.appendChild(this.contentDiv);
this.div.appendChild(this.groupDiv);
if (closeBox == true) { if (closeBox == true) {
// close icon // close icon
@@ -110,7 +102,7 @@ OpenLayers.Popup.prototype = {
img); img);
closeImg.style.right = this.padding + "px"; closeImg.style.right = this.padding + "px";
closeImg.style.top = this.padding + "px"; closeImg.style.top = this.padding + "px";
this.groupDiv.appendChild(closeImg); this.div.appendChild(closeImg);
var closePopup = function(e) { var closePopup = function(e) {
this.hide(); this.hide();

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -139,7 +139,7 @@ OpenLayers.Popup.AnchoredBubble.prototype =
if (firstTime) { if (firstTime) {
OpenLayers.Rico.Corner.round(this.div, options); OpenLayers.Rico.Corner.round(this.div, options);
} else { } else {
OpenLayers.Rico.Corner.reRound(this.groupDiv, options); OpenLayers.Rico.Corner.reRound(this.contentDiv, options);
//set the popup color and opacity //set the popup color and opacity
this.setBackgroundColor(); this.setBackgroundColor();
this.setOpacity(); this.setOpacity();

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */
@@ -50,9 +50,7 @@ OpenLayers.Renderer.SVG.prototype =
*/ */
supported: function() { supported: function() {
var svgFeature = "http://www.w3.org/TR/SVG11/feature#SVG"; var svgFeature = "http://www.w3.org/TR/SVG11/feature#SVG";
var supported = (document.implementation && var supported = (document.implementation.hasFeature("org.w3c.svg", "1.0") || document.implementation.hasFeature(svgFeature, "1.1"));
(document.implementation.hasFeature("org.w3c.svg", "1.0") ||
document.implementation.hasFeature(svgFeature, "1.1")));
return supported; return supported;
}, },
@@ -284,7 +282,9 @@ OpenLayers.Renderer.SVG.prototype =
node.setAttributeNS(null, "cy", y); node.setAttributeNS(null, "cy", y);
node.setAttributeNS(null, "r", radius); node.setAttributeNS(null, "r", radius);
} else { } else {
this.root.removeChild(node); node.setAttributeNS(null, "cx", "");
node.setAttributeNS(null, "cy", "");
node.setAttributeNS(null, "r", 0);
} }
}, },
@@ -434,9 +434,8 @@ OpenLayers.Renderer.SVG.prototype =
var strings = []; var strings = [];
for(var i = 0; i < components.length; i++) { for(var i = 0; i < components.length; i++) {
var component = this.getShortString(components[i]); var component = this.getShortString(components[i]);
if (component) { if (!component) { return false; }
strings.push(component); strings.push(component);
}
} }
return strings.join(","); return strings.join(",");
}, },

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under a BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt * See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */ * for the full text of the license. */

Some files were not shown because too many files have changed in this diff Show More