Tag RC4 release.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4-rc4@3178 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#map {
|
#map {
|
||||||
width: 512px;
|
width: 45%;
|
||||||
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">
|
<div style="float:right;width:50%">
|
||||||
<textarea id="gml" cols="80" rows="30"></textarea>
|
<textarea id="gml" style="width:100%" rows="30"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -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");
|
"example popup", true);
|
||||||
|
|
||||||
map.addPopup(popup);
|
map.addPopup(popup);
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
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();
|
popup = feature.createPopup(true);
|
||||||
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);
|
||||||
|
|||||||
@@ -17,11 +17,23 @@
|
|||||||
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);
|
var pointFeature = new OpenLayers.Feature.Vector(point,null,style_blue);
|
||||||
|
|
||||||
// create a line feature from a list of points
|
// create a line feature from a list of points
|
||||||
var pointList = [];
|
var pointList = [];
|
||||||
@@ -32,7 +44,7 @@
|
|||||||
pointList.push(newPoint);
|
pointList.push(newPoint);
|
||||||
}
|
}
|
||||||
var lineFeature = new OpenLayers.Feature.Vector(
|
var lineFeature = new OpenLayers.Feature.Vector(
|
||||||
new OpenLayers.Geometry.LineString(pointList));
|
new OpenLayers.Geometry.LineString(pointList),null,style_green);
|
||||||
|
|
||||||
// create a polygon feature from a linear ring of points
|
// create a polygon feature from a linear ring of points
|
||||||
var pointList = [];
|
var pointList = [];
|
||||||
@@ -59,5 +71,9 @@
|
|||||||
</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>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displayWKT(feature) {
|
function displayWKT(feature) {
|
||||||
var str = wkt.write(feature.geometry);
|
var str = wkt.write(feature);
|
||||||
// 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,19 +86,18 @@
|
|||||||
|
|
||||||
function parseWKT() {
|
function parseWKT() {
|
||||||
var element = document.getElementById('wkt');
|
var element = document.getElementById('wkt');
|
||||||
var collection = wkt.read(element.value);
|
var features = wkt.read(element.value);
|
||||||
var bounds;
|
var bounds;
|
||||||
if(collection) {
|
if(features) {
|
||||||
if(collection.constructor != Array) {
|
if(features.constructor != Array) {
|
||||||
collection = [collection];
|
features = [features];
|
||||||
}
|
}
|
||||||
var features = [];
|
for(var i=0; i<features.length; ++i) {
|
||||||
for(var i=0; i<collection.length; ++i) {
|
|
||||||
features.push(new OpenLayers.Feature.Vector(collection[i]));
|
|
||||||
if (!bounds) {
|
if (!bounds) {
|
||||||
bounds = collection[i].getBounds();
|
bounds = features[i].geometry.getBounds();
|
||||||
|
} else {
|
||||||
|
bounds.extend(features[i].geometry.getBounds());
|
||||||
}
|
}
|
||||||
bounds.extend(collection[i].getBounds());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
vectors.addFeatures(features);
|
vectors.addFeatures(features);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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/BaseTypes.js
|
/* @requires OpenLayers/BaseTypes.js
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +32,8 @@ OpenLayers.Class = {
|
|||||||
//
|
//
|
||||||
// to be revisited in 3.0
|
// to be revisited in 3.0
|
||||||
//
|
//
|
||||||
if (arguments[i].hasOwnProperty('toString')) {
|
if((arguments[i].hasOwnProperty && arguments[i].hasOwnProperty('toString')) ||
|
||||||
|
(!arguments[i].hasOwnProperty && arguments[i].toString)) {
|
||||||
proto.toString = arguments[i].toString;
|
proto.toString = arguments[i].toString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
/**
|
/**
|
||||||
* @fileoverview Locator Map Control
|
* @fileoverview Locator Map Control
|
||||||
@@ -180,7 +180,8 @@ 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);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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,6 +121,7 @@ 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.
|
||||||
@@ -132,7 +133,7 @@ OpenLayers.Feature.prototype= {
|
|||||||
*
|
*
|
||||||
* @type OpenLayers.Popup.AnchoredBubble
|
* @type OpenLayers.Popup.AnchoredBubble
|
||||||
*/
|
*/
|
||||||
createPopup: function() {
|
createPopup: function(closeBox) {
|
||||||
|
|
||||||
if (this.lonlat != null) {
|
if (this.lonlat != null) {
|
||||||
|
|
||||||
@@ -143,7 +144,7 @@ OpenLayers.Feature.prototype= {
|
|||||||
this.lonlat,
|
this.lonlat,
|
||||||
this.data.popupSize,
|
this.data.popupSize,
|
||||||
this.data.popupContentHTML,
|
this.data.popupContentHTML,
|
||||||
anchor);
|
anchor, closeBox);
|
||||||
}
|
}
|
||||||
return this.popup;
|
return this.popup;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
// TRASH THIS
|
// TRASH THIS
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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].lat + " " + points[i].lon + " ";
|
path += points[i].y + " " + points[i].x + " ";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path += geometry.lat + " " + geometry.lon + " ";
|
path += geometry.y + " " + geometry.x + " ";
|
||||||
}
|
}
|
||||||
return document.createTextNode(path);
|
return document.createTextNode(path);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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,38 +25,41 @@ OpenLayers.Format.WKT.prototype =
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deserialize a WKT string and return an OpenLayers.Geometry or an array
|
* Deserialize a WKT string and return an OpenLayers.Feature.Vector or an
|
||||||
* of OpenLayers.Geometry. Supports WKT for POINT, MULTIPOINT, LINESTRING,
|
* array of OpenLayers.Feature.Vector. Supports WKT for POINT, MULTIPOINT,
|
||||||
* MULTILINESTRING, POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION.
|
* LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and
|
||||||
|
* GEOMETRYCOLLECTION.
|
||||||
* @param {String} wkt A WKT string
|
* @param {String} wkt A WKT string
|
||||||
* @returns {OpenLayers.Geometry|Array} A geometry or array of geometries
|
* @returns {OpenLayers.Feature.Vector|Array} A feature or array of
|
||||||
* for GEOMETRYCOLLECTION WKT.
|
* features for
|
||||||
|
* GEOMETRYCOLLECTION WKT.
|
||||||
*/
|
*/
|
||||||
read: function(wkt) {
|
read: function(wkt) {
|
||||||
var geometry, type, str;
|
var features, 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]) {
|
||||||
geometry = this.parse[type].apply(this, [str]);
|
features = this.parse[type].apply(this, [str]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return geometry;
|
return features;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serialize a geometry or array of geometries into a WKT string.
|
* Serialize a feature or array of features into a WKT string.
|
||||||
* @param {OpenLayers.Geometry|Array} geom A geometry or array of geometries
|
* @param {OpenLayers.Feature.Vector|Array} features A feature or array of
|
||||||
|
* features
|
||||||
* @returns {String} The WKT string representation of the input geometries
|
* @returns {String} The WKT string representation of the input geometries
|
||||||
*/
|
*/
|
||||||
write: function(geom) {
|
write: function(features) {
|
||||||
var collection, geometry, type, data, isCollection;
|
var collection, geometry, type, data, isCollection;
|
||||||
if(geom.constructor == Array) {
|
if(features.constructor == Array) {
|
||||||
collection = geom;
|
collection = features;
|
||||||
isCollection = true;
|
isCollection = true;
|
||||||
} else {
|
} else {
|
||||||
collection = [geom];
|
collection = [features];
|
||||||
isCollection = false;
|
isCollection = false;
|
||||||
}
|
}
|
||||||
var pieces = [];
|
var pieces = [];
|
||||||
@@ -67,7 +70,7 @@ OpenLayers.Format.WKT.prototype =
|
|||||||
if(isCollection && i>0) {
|
if(isCollection && i>0) {
|
||||||
pieces.push(',');
|
pieces.push(',');
|
||||||
}
|
}
|
||||||
geometry = collection[i];
|
geometry = collection[i].geometry;
|
||||||
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;
|
||||||
@@ -178,47 +181,57 @@ OpenLayers.Format.WKT.prototype =
|
|||||||
*/
|
*/
|
||||||
parse: {
|
parse: {
|
||||||
/**
|
/**
|
||||||
* Return point geometry given a point WKT fragment.
|
* Return point feature 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.Geometry.Point} A point geometry
|
* @returns {OpenLayers.Feature.Vector} A point feature
|
||||||
|
* @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.Geometry.Point(coords[0], coords[1]);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.Point(coords[0], coords[1])
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a multipoint geometry given a multipoint WKT fragment.
|
* Return a multipoint feature given a multipoint WKT fragment.
|
||||||
* @param {String} A WKT fragment representing the multipoint
|
* @param {String} A WKT fragment representing the multipoint
|
||||||
* @returns {OpenLayers.Geometry.MultiPoint} A multipoint geometry
|
* @returns {OpenLayers.Feature.Vector} A multipoint feature
|
||||||
|
* @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]]));
|
components.push(this.parse.point.apply(this, [points[i]]).geometry);
|
||||||
}
|
}
|
||||||
return new OpenLayers.Geometry.MultiPoint(components);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.MultiPoint(components)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a linestring geometry given a linestring WKT fragment.
|
* Return a linestring feature given a linestring WKT fragment.
|
||||||
* @param {String} A WKT fragment representing the linestring
|
* @param {String} A WKT fragment representing the linestring
|
||||||
* @returns {OpenLayers.Geometry.LineString} A linestring geometry
|
* @returns {OpenLayers.Feature.Vector} A linestring feature
|
||||||
|
* @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]]));
|
components.push(this.parse.point.apply(this, [points[i]]).geometry);
|
||||||
}
|
}
|
||||||
return new OpenLayers.Geometry.LineString(components);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.LineString(components)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a multilinestring geometry given a multilinestring WKT fragment.
|
* Return a multilinestring feature given a multilinestring WKT fragment.
|
||||||
* @param {String} A WKT fragment representing the multilinestring
|
* @param {String} A WKT fragment representing the multilinestring
|
||||||
* @returns {OpenLayers.Geometry.LineString} A multilinestring geometry
|
* @returns {OpenLayers.Feature.Vector} A multilinestring feature
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
'multilinestring': function(str) {
|
'multilinestring': function(str) {
|
||||||
var line;
|
var line;
|
||||||
@@ -226,15 +239,18 @@ 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]));
|
components.push(this.parse.linestring.apply(this, [line]).geometry);
|
||||||
}
|
}
|
||||||
return new OpenLayers.Geometry.MultiLineString(components);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.MultiLineString(components)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a polygon geometry given a polygon WKT fragment.
|
* Return a polygon feature given a polygon WKT fragment.
|
||||||
* @param {String} A WKT fragment representing the polygon
|
* @param {String} A WKT fragment representing the polygon
|
||||||
* @returns {OpenLayers.Geometry.Polygon} A polygon geometry
|
* @returns {OpenLayers.Feature.Vector} A polygon feature
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
'polygon': function(str) {
|
'polygon': function(str) {
|
||||||
var ring, linestring, linearring;
|
var ring, linestring, linearring;
|
||||||
@@ -242,17 +258,20 @@ 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]);
|
linestring = this.parse.linestring.apply(this, [ring]).geometry;
|
||||||
linearring = new OpenLayers.Geometry.LinearRing(linestring.components);
|
linearring = new OpenLayers.Geometry.LinearRing(linestring.components)
|
||||||
components.push(linearring);
|
components.push(linearring);
|
||||||
}
|
}
|
||||||
return new OpenLayers.Geometry.Polygon(components);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.Polygon(components)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a multipolygon geometry given a multipolygon WKT fragment.
|
* Return a multipolygon feature given a multipolygon WKT fragment.
|
||||||
* @param {String} A WKT fragment representing the multipolygon
|
* @param {String} A WKT fragment representing the multipolygon
|
||||||
* @returns {OpenLayers.Geometry.MultiPolygon} A multipolygon geometry
|
* @returns {OpenLayers.Feature.Vector} A multipolygon feature
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
'multipolygon': function(str) {
|
'multipolygon': function(str) {
|
||||||
var polygon;
|
var polygon;
|
||||||
@@ -260,15 +279,18 @@ 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]));
|
components.push(this.parse.polygon.apply(this, [polygon]).geometry);
|
||||||
}
|
}
|
||||||
return new OpenLayers.Geometry.MultiPolygon(components);
|
return new OpenLayers.Feature.Vector(
|
||||||
|
new OpenLayers.Geometry.MultiPolygon(components)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array of geometries given a geometrycollection WKT fragment.
|
* Return an array of features 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.Geometry
|
* @returns {Array} An array of OpenLayers.Feature.Vector
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
'geometrycollection': function(str) {
|
'geometrycollection': function(str) {
|
||||||
// separate components of the collection with |
|
// separate components of the collection with |
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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 = {
|
||||||
@@ -150,7 +151,9 @@ OpenLayers.Geometry.prototype = {
|
|||||||
* @type String
|
* @type String
|
||||||
*/
|
*/
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return OpenLayers.Format.WKT.prototype.write(this);
|
return OpenLayers.Format.WKT.prototype.write(
|
||||||
|
new OpenLayers.Feature.Vector(this)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** @final @type String */
|
/** @final @type String */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
@@ -608,6 +608,7 @@ 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);
|
||||||
@@ -615,6 +616,7 @@ OpenLayers.Layer.prototype = {
|
|||||||
|
|
||||||
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;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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,6 +11,7 @@
|
|||||||
* @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 =
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD licence.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD licence.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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,8 +97,7 @@ OpenLayers.Layer.Vector.prototype =
|
|||||||
destroy: function() {
|
destroy: function() {
|
||||||
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
|
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
|
||||||
|
|
||||||
// HACK HACK -- I believe we should be iterating and
|
this.destroyFeatures();
|
||||||
// calling feature[i].destroy() here.
|
|
||||||
this.features = null;
|
this.features = null;
|
||||||
this.selectedFeatures = null;
|
this.selectedFeatures = null;
|
||||||
if (this.renderer) {
|
if (this.renderer) {
|
||||||
@@ -247,7 +246,9 @@ 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,
|
//in the case that this feature is one of the selected features,
|
||||||
// remove it from that array as well.
|
// remove it from that array as well.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
@@ -93,6 +93,8 @@ OpenLayers.Layer.WMS.Untiled.prototype =
|
|||||||
|
|
||||||
// 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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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,12 +199,26 @@ 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 addNode = true;
|
||||||
|
var nodes = document.getElementsByTagName('link');
|
||||||
|
for(var i=0; i<nodes.length; ++i) {
|
||||||
|
if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,
|
||||||
|
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');
|
var cssNode = document.createElement('link');
|
||||||
cssNode.setAttribute('rel', 'stylesheet');
|
cssNode.setAttribute('rel', 'stylesheet');
|
||||||
cssNode.setAttribute('type', 'text/css');
|
cssNode.setAttribute('type', 'text/css');
|
||||||
cssNode.setAttribute('href', this.theme);
|
cssNode.setAttribute('href', this.theme);
|
||||||
document.getElementsByTagName('head')[0].appendChild(cssNode);
|
document.getElementsByTagName('head')[0].appendChild(cssNode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.layers = [];
|
this.layers = [];
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
@@ -46,6 +46,9 @@ OpenLayers.Popup.prototype = {
|
|||||||
/** @type DOMElement */
|
/** @type DOMElement */
|
||||||
contentDiv:null,
|
contentDiv:null,
|
||||||
|
|
||||||
|
/** @type DOMElement */
|
||||||
|
groupDiv:null,
|
||||||
|
|
||||||
/** @type int */
|
/** @type int */
|
||||||
padding: 5,
|
padding: 5,
|
||||||
|
|
||||||
@@ -85,12 +88,17 @@ OpenLayers.Popup.prototype = {
|
|||||||
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.div.appendChild(this.contentDiv);
|
this.groupDiv.appendChild(this.contentDiv);
|
||||||
|
this.div.appendChild(this.groupDiv);
|
||||||
|
|
||||||
if (closeBox == true) {
|
if (closeBox == true) {
|
||||||
// close icon
|
// close icon
|
||||||
@@ -102,7 +110,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.div.appendChild(closeImg);
|
this.groupDiv.appendChild(closeImg);
|
||||||
|
|
||||||
var closePopup = function(e) {
|
var closePopup = function(e) {
|
||||||
this.hide();
|
this.hide();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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.contentDiv, options);
|
OpenLayers.Rico.Corner.reRound(this.groupDiv, options);
|
||||||
//set the popup color and opacity
|
//set the popup color and opacity
|
||||||
this.setBackgroundColor();
|
this.setBackgroundColor();
|
||||||
this.setOpacity();
|
this.setOpacity();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -282,9 +282,7 @@ 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 {
|
||||||
node.setAttributeNS(null, "cx", "");
|
this.root.removeChild(node);
|
||||||
node.setAttributeNS(null, "cy", "");
|
|
||||||
node.setAttributeNS(null, "r", 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -434,9 +432,10 @@ 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) { return false; }
|
if (component) {
|
||||||
strings.push(component);
|
strings.push(component);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return strings.join(",");
|
return strings.join(",");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
_OPENLAYERS_SFL_=true;
|
_OPENLAYERS_SFL_=true;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||||
* See http://svn.openlayers.org/trunk/openlayers/repository-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
Reference in New Issue
Block a user