Compare commits
1 Commits
release-1.
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbc808c5d0 |
@@ -6,9 +6,5 @@ Philip Lindsay
|
||||
John Frank
|
||||
Schuyler Erle
|
||||
|
||||
Patch contributors
|
||||
------------------
|
||||
Corey Puffault
|
||||
|
||||
OpenLayers is graciously supported by MetaCarta, Inc.
|
||||
<http://www.metacarta.com>.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, cie_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.events.register("click", map, function(e) {
|
||||
var lonlat = map.getLonLatFromViewPortPx(e.xy);
|
||||
alert("You clicked near " + lonlat.lat + " N, " +
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -34,8 +34,7 @@
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -31,8 +31,7 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -16,14 +16,12 @@
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap",
|
||||
"http://www.h2guide.com/my-ka-map/h2tile.php?",
|
||||
{ map: 'h2guide', g: 'background' },
|
||||
new OpenLayers.LonLat(0,0));
|
||||
"http://www.h2guide.com/my-ka-map/h2tile.php?" , { map: 'h2guide', g: 'background' }, new OpenLayers.LonLat(0,0));
|
||||
|
||||
|
||||
map.addLayers([ol_wms, ka_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -25,15 +25,14 @@
|
||||
|
||||
size = new OpenLayers.Size(50,50);
|
||||
calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h); };
|
||||
icon = new OpenLayers.Icon(
|
||||
'http://boston.openguides.org/markers/AQUA.png',
|
||||
size, null, calculateOffset);
|
||||
markers.addMarker(
|
||||
new OpenLayers.Marker(new OpenLayers.LonLat(-180,90), icon));
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,null, calculateOffset);
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-180,90),
|
||||
icon));
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function resize() {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -31,8 +31,8 @@
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon);
|
||||
marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); Event.stop(evt); });
|
||||
markers.addMarker(marker);
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -23,8 +23,8 @@
|
||||
var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" );
|
||||
map.addLayer(newl);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -34,8 +34,8 @@
|
||||
markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function changer() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -11,7 +11,7 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map', {maxResolution: 'auto'});
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -20,8 +20,14 @@
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS2",
|
||||
"http://octo.metacarta.com/cgi-bin/mapserv",
|
||||
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} );
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function changer() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,18 +14,20 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
OpenLayers.ProxyHost = '/dev/examples/proxy.cgi?url=';
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "Owl Survey",
|
||||
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
|
||||
{typename: "OWLS", maxfeatures: 10},
|
||||
OpenLayers.Feature.WFS );
|
||||
layer = new OpenLayers.Layer.WFS( "OpenLayers WFS",
|
||||
"http://labs.metacarta.com/search/WFS?",
|
||||
{q: 'dolphins', maxfeatures: 10} );
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
///
|
||||
|
||||
OpenLayers = new Object();
|
||||
|
||||
OpenLayers._scriptName = (
|
||||
typeof(_OPENLAYERS_SFL_) == "undefined" ? "lib/OpenLayers.js"
|
||||
: "OpenLayers.js" );
|
||||
|
||||
OpenLayers._scriptName = "lib/OpenLayers.js";
|
||||
OpenLayers._getScriptLocation = function () {
|
||||
var scriptLocation = "";
|
||||
var SCRIPT_NAME = OpenLayers._scriptName;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||
OpenLayers.ProxyHost = "/viewer/Crossbrowser/blindproxy.py?url=";
|
||||
//OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
|
||||
|
||||
/**
|
||||
@@ -110,4 +110,4 @@ OpenLayers.parseXMLString = function(text) {
|
||||
);
|
||||
|
||||
return ajaxResponse;
|
||||
};
|
||||
};
|
||||
@@ -143,8 +143,6 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
||||
backdropLabelOuter.style.marginTop = "4px";
|
||||
backdropLabelOuter.style.marginBottom = "4px";
|
||||
|
||||
this._setEventHandlers(backdropLabelOuter);
|
||||
|
||||
// Inner Label - for Rico Corners
|
||||
//
|
||||
var backdropLabel = document.createElement('p');
|
||||
@@ -193,10 +191,9 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
||||
_setEventHandlers : function(element, labelDiv) {
|
||||
|
||||
// We only want to respond to a mousedown event.
|
||||
element.onclick = this.singleClick.bindAsEventListener(this);
|
||||
element.ondblclick = this.singleClick.bindAsEventListener(this);
|
||||
element.onmouseup = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.onmousedown = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.onclick = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.ondblclick = this.ignoreEvent.bindAsEventListener(this);
|
||||
element.onmousedown = this.singleClick.bindAsEventListener(this);
|
||||
|
||||
// If we are operating on a corner span we need to store a
|
||||
// reference to the actual tab. (See comment about OL #57 fix above.)
|
||||
|
||||
@@ -22,7 +22,6 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
},
|
||||
|
||||
defaultClick: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
var notAfterDrag = !this.performedDrag;
|
||||
this.performedDrag = false;
|
||||
return notAfterDrag;
|
||||
@@ -40,7 +39,6 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.performedDrag = false;
|
||||
if (evt.shiftKey) {
|
||||
@@ -96,7 +94,6 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseUp: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
if (this.zoomBox) {
|
||||
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
|
||||
var end = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
|
||||
@@ -63,7 +63,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
|
||||
btn.events = new OpenLayers.Events(this, btn);
|
||||
btn.events.register("mousedown", this, this.buttonClick);
|
||||
btn.events.register("mouseup", this, Event.stop);
|
||||
btn.events.register("mouseup", this, this.stopAction);
|
||||
btn.action = id;
|
||||
btn.title = title;
|
||||
btn.alt = title;
|
||||
@@ -74,8 +74,11 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
return btn;
|
||||
},
|
||||
|
||||
stopAction: function(evt) {
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
buttonClick: function(evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.switchModeTo(evt.div.action);
|
||||
Event.stop(evt);
|
||||
},
|
||||
@@ -93,7 +96,6 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
if (evt.shiftKey && this.mode !="zoombox") {
|
||||
this.switchModeTo("zoombox");
|
||||
@@ -169,7 +171,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
switchModeTo: function(mode) {
|
||||
if (mode != this.mode) {
|
||||
if (this.mode) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation);
|
||||
this.buttons[this.mode].firstChild.src = this.buttons[this.mode].imgLocation;
|
||||
}
|
||||
if (this.mode == "measure" && mode != "measure") {
|
||||
for(var i = 0; i < this.measureDivs.length; i++) {
|
||||
@@ -181,7 +183,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.measureStart = null;
|
||||
}
|
||||
this.mode = mode;
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation);
|
||||
this.buttons[mode].firstChild.src = this.buttons[mode].activeImgLocation;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -224,7 +226,6 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
* @param {Event} evt
|
||||
*/
|
||||
defaultMouseUp: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
switch (this.mode) {
|
||||
case "zoombox":
|
||||
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
|
||||
|
||||
@@ -111,7 +111,6 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
* @param {event} evt
|
||||
*/
|
||||
buttonDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
|
||||
var slide = this.map.getResolution() * this.slideFactor;
|
||||
var center = this.map.getCenter();
|
||||
|
||||
@@ -127,7 +127,6 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* and sets the zoom level appropriately.
|
||||
*/
|
||||
divClick: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
var y = evt.xy.y;
|
||||
var top = Position.page(evt.object)[1];
|
||||
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
||||
@@ -140,7 +139,6 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* event listener for clicks on the slider
|
||||
*/
|
||||
zoomBarDown:function(evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.map.events.register("mousemove", this, this.passEventToSlider);
|
||||
this.map.events.register("mouseup", this, this.passEventToSlider);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
@@ -175,7 +173,6 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
* and switch to it.
|
||||
*/
|
||||
zoomBarUp:function(evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
if (this.zoomStart) {
|
||||
this.div.style.cursor="default";
|
||||
this.map.events.remove("mousemove");
|
||||
|
||||
@@ -43,15 +43,8 @@ OpenLayers.Feature.WFS.prototype =
|
||||
*/
|
||||
processXMLNode: function(xmlNode) {
|
||||
//this should be overridden by subclasses
|
||||
|
||||
// must return an Object with 'id' and 'lonlat' values set
|
||||
var point = xmlNode.getElementsByTagName("Point");
|
||||
var text = point[0].textContent;
|
||||
var floats = text.split(",");
|
||||
|
||||
return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),
|
||||
parseFloat(floats[1])),
|
||||
id: null};
|
||||
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
|
||||
@@ -12,7 +12,7 @@ OpenLayers.Layer.WFS.prototype =
|
||||
Object.extend(new OpenLayers.Layer.Markers(), {
|
||||
|
||||
/** @type Object */
|
||||
featureClass: OpenLayers.Feature.WFS,
|
||||
featureClass: null,
|
||||
|
||||
/** @final @type hash */
|
||||
DEFAULT_PARAMS: { service: "WFS",
|
||||
@@ -30,7 +30,7 @@ OpenLayers.Layer.WFS.prototype =
|
||||
* @param {Object} featureClass
|
||||
*/
|
||||
initialize: function(name, url, params, featureClass) {
|
||||
if (featureClass != null) this.featureClass = featureClass;
|
||||
this.featureClass = featureClass;
|
||||
|
||||
var newArguments = new Array();
|
||||
if (arguments.length > 0) {
|
||||
|
||||
@@ -545,11 +545,12 @@ OpenLayers.Map.prototype = {
|
||||
*/
|
||||
zoomToFullExtent: function() {
|
||||
var fullExtent = this.getFullExtent();
|
||||
var oldZoom = this.zoom;
|
||||
this.setCenter(
|
||||
new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2,
|
||||
(fullExtent.bottom+fullExtent.top)/2),
|
||||
this.getZoomForExtent(fullExtent)
|
||||
);
|
||||
0
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,7 +51,7 @@ OpenLayers.Popup.AnchoredBubble.prototype =
|
||||
var id = this.div.id + "-contentDiv";
|
||||
this.contentDiv = OpenLayers.Util.createDiv(id, null, contentSize,
|
||||
null, "relative", null,
|
||||
"hidden");
|
||||
"none");
|
||||
this.div.appendChild(this.contentDiv);
|
||||
this.setContentHTML();
|
||||
|
||||
|
||||
@@ -36,9 +36,7 @@ OpenLayers.Tile.Image.prototype =
|
||||
/**
|
||||
*/
|
||||
draw:function(transparent) {
|
||||
if (false) { // don't actually use the alpha PNG hack right now
|
||||
// it has a fiercely bad effect on IE6's performance
|
||||
// if (transparent) {
|
||||
if (transparent) {
|
||||
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
|
||||
this.position,
|
||||
this.size,
|
||||
|
||||
@@ -79,7 +79,7 @@ OpenLayers.Tile.WFS.prototype =
|
||||
doc = OpenLayers.parseXMLString(request.responseText);
|
||||
}
|
||||
|
||||
var resultFeatures = doc.getElementsByTagName("featureMember");
|
||||
var resultFeatures = OpenLayers.Util.getNodes(doc, "gml:featureMember");
|
||||
|
||||
//clear old featureList
|
||||
this.features = new Array();
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
}
|
||||
function test_03_Control_PanZoom_control_events (t) {
|
||||
t.plan( 7 );
|
||||
var evt = {which: 1}; // control expects left-click
|
||||
var evt = new Object();
|
||||
map = new OpenLayers.Map('map');
|
||||
control = new OpenLayers.Control.PanZoom();
|
||||
map.addControl(control,
|
||||
new OpenLayers.Pixel(20,20));
|
||||
map.setCenter(new OpenLayers.LonLat(0,0), 4);
|
||||
map.setCenter(new OpenLayers.LonLat(0,0), 0);
|
||||
var res = map.getResolution();
|
||||
control.buttons[0].onmousedown(evt);
|
||||
t.eq( map.getCenter().lat, res*50, "Pan up works correctly" );
|
||||
@@ -45,12 +45,12 @@
|
||||
t.eq( map.getCenter().lat, 0, "Pan down works correctly" );
|
||||
control.buttons[4].onmousedown(evt);
|
||||
control.buttons[4].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 6, "zoomin works correctly" );
|
||||
t.eq( map.getZoom(), 2, "zoomin workds correctly" );
|
||||
control.buttons[6].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 5, "zoomout works correctly" );
|
||||
t.eq( map.getZoom(), 1, "zoomout workds correctly" );
|
||||
control.buttons[4].onmousedown(evt);
|
||||
control.buttons[5].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 2, "zoomworld works correctly" );
|
||||
t.eq( map.getZoom(), 0, "zoomworld workds correctly" );
|
||||
|
||||
}
|
||||
// -->
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
map.zoomTo(5);
|
||||
t.eq( map.getZoom(), 5, "map.zoom is correct after calling zoomTo" );
|
||||
map.zoomToFullExtent();
|
||||
t.eq( map.getZoom(), 2, "map.zoom is correct after calling zoomToFullExtent" );
|
||||
t.eq( map.getZoom(), 0, "map.zoom is correct after calling zoomToFullExtent" );
|
||||
var lonlat = map.getCenter();
|
||||
var zero = new OpenLayers.LonLat(0, 0);
|
||||
t.ok( lonlat.equals(zero), "map center is correct after calling zoomToFullExtent" );
|
||||
|
||||
Reference in New Issue
Block a user