[OpenLayers-Commits] r11742 - in sandbox/cmoullet/openlayers: .
examples lib/OpenLayers lib/OpenLayers/Format
lib/OpenLayers/Renderer lib/OpenLayers/Tile tests/Format
theme/default theme/default/img
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Tue Mar 29 05:48:37 EDT 2011
Author: cmoullet
Date: 2011-03-29 02:48:36 -0700 (Tue, 29 Mar 2011)
New Revision: 11742
Modified:
sandbox/cmoullet/openlayers/
sandbox/cmoullet/openlayers/examples/editingtoolbar-outside.html
sandbox/cmoullet/openlayers/examples/navtoolbar-alwaysZoom.html
sandbox/cmoullet/openlayers/examples/navtoolbar-outsidemap.html
sandbox/cmoullet/openlayers/examples/snap-split.html
sandbox/cmoullet/openlayers/examples/snapping.html
sandbox/cmoullet/openlayers/lib/OpenLayers/Format/Context.js
sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js
sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js
sandbox/cmoullet/openlayers/lib/OpenLayers/Renderer/VML.js
sandbox/cmoullet/openlayers/lib/OpenLayers/Tile/Image.js
sandbox/cmoullet/openlayers/tests/Format/WMC.html
sandbox/cmoullet/openlayers/tests/Format/WMSGetFeatureInfo.html
sandbox/cmoullet/openlayers/theme/default/img/editing_tool_bar.png
sandbox/cmoullet/openlayers/theme/default/style.css
Log:
Merge with trunk
Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11688,11690-11730
+ /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11688,11690-11741
Modified: sandbox/cmoullet/openlayers/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/editingtoolbar-outside.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/examples/editingtoolbar-outside.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -9,11 +9,16 @@
<style type="text/css">
.olControlEditingToolbar {
float:left;
- right: 0px;
- height: 30px;
- width: 150px;
+ width: auto;
}
</style>
+ <!--[if lte IE 6]>
+ <style type="text/css">
+ .olControlEditingToolbar {
+ width: 150px;
+ }
+ </style>
+ <![endif]-->
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
Modified: sandbox/cmoullet/openlayers/examples/navtoolbar-alwaysZoom.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/navtoolbar-alwaysZoom.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/examples/navtoolbar-alwaysZoom.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -7,7 +7,7 @@
<link rel="stylesheet" href="style.css" type="text/css" />
<!-- Override the position of the toolbar to make it fit in a small map -->
<style type='text/css'>
- .olControlNavToolbar div {
+ .olControlNavToolbar {
top: 150px;
}
</style>
@@ -49,7 +49,7 @@
var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
this.activateControl(this.controls[0]);
return div;
- },
+ }
});
var map;
Modified: sandbox/cmoullet/openlayers/examples/navtoolbar-outsidemap.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/navtoolbar-outsidemap.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/examples/navtoolbar-outsidemap.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -5,15 +5,6 @@
<title>OpenLayers: Custom Navigation Toolbar</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
- <style type="text/css">
- #paneldiv {
- height: 80px;
- }
- #paneldiv div {
- top: 10px;
- }
-
- </style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
Modified: sandbox/cmoullet/openlayers/examples/snap-split.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/snap-split.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/examples/snap-split.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -7,10 +7,10 @@
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
.olControlEditingToolbar .olControlModifyFeatureItemInactive {
- background-position: -1px 0px ;
+ background-position: -1px -1px;
}
.olControlEditingToolbar .olControlModifyFeatureItemActive {
- background-position: -1px -23px ;
+ background-position: -1px -24px;
}
label.head {
font-weight: bold;
Modified: sandbox/cmoullet/openlayers/examples/snapping.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/snapping.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/examples/snapping.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -7,10 +7,10 @@
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
.olControlEditingToolbar .olControlModifyFeatureItemInactive {
- background-position: -1px 0px ;
+ background-position: -1px -1px;
}
.olControlEditingToolbar .olControlModifyFeatureItemActive {
- background-position: -1px -23px ;
+ background-position: -1px -24px;
}
table {
padding: 1em 0 1em;
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Format/Context.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Format/Context.js 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Format/Context.js 2011-03-29 09:48:36 UTC (rev 11742)
@@ -269,9 +269,14 @@
*/
contextToMap: function(context, options) {
options = OpenLayers.Util.applyDefaults({
- maxExtent: context.maxExtent,
- projection: context.projection
+ maxExtent: context.maxExtent,
+ projection: context.projection,
+ units: context.units
}, options);
+ if (options.maxExtent) {
+ options.maxResolution =
+ options.maxExtent.getWidth() / OpenLayers.Map.TILE_WIDTH;
+ }
var map = new OpenLayers.Map(options);
map.addLayers(this.getLayersFromContext(context.layersContext));
map.setCenter(
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js 2011-03-29 09:48:36 UTC (rev 11742)
@@ -150,10 +150,25 @@
var featureNode = featureNodes[i];
var geom = null;
+ // attributes can be actual attributes on the FIELDS tag,
+ // or FIELD children
var attributes = {};
- for(var j=0, jlen=featureNode.attributes.length; j<jlen; j++) {
- var attribute = featureNode.attributes[j];
- attributes[attribute.nodeName] = attribute.nodeValue;
+ var j;
+ var jlen = featureNode.attributes.length;
+ if (jlen > 0) {
+ for(j=0; j<jlen; j++) {
+ var attribute = featureNode.attributes[j];
+ attributes[attribute.nodeName] = attribute.nodeValue;
+ }
+ } else {
+ var nodes = featureNode.childNodes;
+ for (j=0, jlen=nodes.length; j<jlen; ++j) {
+ var node = nodes[j];
+ if (node.nodeType != 3) {
+ attributes[node.getAttribute("name")] =
+ node.getAttribute("value");
+ }
+ }
}
response.push(
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Map.js 2011-03-29 09:48:36 UTC (rev 11742)
@@ -1704,10 +1704,10 @@
if (wrapDateLine) {
if (this.maxPx.x > maxX) {
this.maxPx.x -= (maxX - minX);
- };
+ }
if (this.minPx.x < minX) {
this.minPx.x += (maxX - minX);
- };
+ }
}
}
if (dy) {
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Renderer/VML.js 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Renderer/VML.js 2011-03-29 09:48:36 UTC (rev 11742)
@@ -837,6 +837,9 @@
textbox.innerText = style.label;
+ if (style.cursor != "inherit" && style.cursor != null) {
+ textbox.style.cursor = style.cursor;
+ }
if (style.fontColor) {
textbox.style.color = style.fontColor;
}
Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Tile/Image.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Tile/Image.js 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Tile/Image.js 2011-03-29 09:48:36 UTC (rev 11742)
@@ -52,14 +52,6 @@
isBackBuffer: false,
/**
- * Property: lastRatio
- * {Float} Used in transition code only. This is the previous ratio
- * of the back buffer tile resolution to the map resolution. Compared
- * with the current ratio to determine if zooming occurred.
- */
- lastRatio: 1,
-
- /**
* Property: isFirstDraw
* {Boolean} Is this the first time the tile is being drawn?
* This is used to force resetBackBuffer to synchronize
@@ -532,7 +524,7 @@
// if the ratio is not the same as it was last time (i.e. we are
// zooming), then we need to adjust the backBuffer tile
- if (ratio != this.lastRatio) {
+ if (ratio != 1) {
if (this.layer.transitionEffect == 'resize') {
// In this case, we can just immediately resize the
// backBufferTile.
@@ -575,7 +567,6 @@
this.backBufferTile.hide();
}
}
- this.lastRatio = ratio;
},
Modified: sandbox/cmoullet/openlayers/tests/Format/WMC.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Format/WMC.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/tests/Format/WMC.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -5,9 +5,10 @@
var v1_0_0 = '<ViewContext xmlns="http://www.opengis.net/context" version="1.0.0" id="OpenLayers_Context_233" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><General><Window width="512" height="256"/><BoundingBox minx="-109.9709708" miny="27.01451459" maxx="-80.02902918" maxy="41.98548541" SRS="EPSG:4326"/><Title/><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/></Extension></General><LayerList><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://t1.hypercube.telascience.org/cgi-bin/landsat7"/></Server><Name>landsat7</Name><Title>NASA Global Mosaic</Title><FormatList><Format current="1">image/jpeg</Format></FormatList><StyleList><Style current="1"><N
ame/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile><ol:tileSize xmlns:ol="http://openlayers.org/context" width="512" height="1024"/></Extension></Layer><Layer queryable="1" hidden="1"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://labs.metacarta.com/wms/vmap0"/></Server><Name>basic</Name><Title>OpenLayers WMS</Title><FormatList><Format current="1">im
age/jpeg</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://lioapp.lrc.gov.on.ca/cubeserv/cubeserv.pl"/></Server><Name>na_road:CCRS</Name><Title>Transportation Network</Title><FormatList><Format curre
nt="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-166.5320000" miny="4.050460000" maxx="-0.2068180000" maxy="70.28700000"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.6</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">false</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" x
link:href="http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/AccuWeather_Maps.wms"/></Server><Name>3:1</Name><Title>Radar 3:1</Title><FormatList><Format current="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-131.0294952" miny="14.56289673" maxx="-61.02950287" maxy="54.56289673"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.8</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">false</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">true</ol:singleTile></Extension
></Layer></LayerList></ViewContext>';
var v1_1_0 = '<ViewContext xmlns="http://www.opengis.net/context" version="1.1.0" id="OpenLayers_Context_232" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><General><Window width="512" height="256"/><BoundingBox minx="-109.9709708" miny="27.01451459" maxx="-80.02902918" maxy="41.98548541" SRS="EPSG:4326"/><Title/><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/></Extension></General><LayerList><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://t1.hypercube.telascience.org/cgi-bin/landsat7"/></Server><Name>landsat7</Name><Title>NASA Global Mosaic</Title><sld:MinScaleDenominator xmlns:sld="http://www.opengis.net/sld">6299645.760</sld:MinScaleDenomin
ator><sld:MaxScaleDenominator xmlns:sld="http://www.opengis.net/sld">31498228.80</sld:MaxScaleDenominator><FormatList><Format current="1">image/jpeg</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:tileSize xmlns:ol="http://openlayers.org/context" width="512" height="1024"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="1"><Server service="OGC:WMS" version="1.1.1"><OnlineResource x
link:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://labs.metacarta.com/wms/vmap0"/></Server><Name>basic</Name><Title>OpenLayers WMS</Title><sld:MinScaleDenominator xmlns:sld="http://www.opengis.net/sld">6299645.760</sld:MinScaleDenominator><sld:MaxScaleDenominator xmlns:sld="http://www.opengis.net/sld">31498228.80</sld:MaxScaleDenominator><FormatList><Format current="1">image/jpeg</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:tileSize xmlns:ol="http://openlayers.org/context" width="512" height="1024"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitch
er xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://lioapp.lrc.gov.on.ca/cubeserv/cubeserv.pl"/></Server><Name>na_road:CCRS</Name><Title>Transportation Network</Title><sld:MinScaleDenominator xmlns:sld="http://www.opengis.net/sld">6200000.000</sld:MinScaleDenominator><sld:MaxScaleDenominator xmlns:sld="http://www.opengis.net/sld">32000000.00</sld:MaxScaleDenominator><FormatList><Format current="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-166.5320000" miny="4.050460000" maxx="-0.2068180000" maxy="70.28700000"/><ol:tileSize xmlns:ol="http://openlayer
s.org/context" width="512" height="1024"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.6</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">false</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/AccuWeather_Maps.wms"/></Server><Name>3:1</Name><Title>Radar 3:1</Title><sld:MinScaleDenominator xmlns:sld="http://www.opengis.net/sld">6299645.760</sld:
MinScaleDenominator><sld:MaxScaleDenominator xmlns:sld="http://www.opengis.net/sld">31498228.80</sld:MaxScaleDenominator><FormatList><Format current="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-131.0294952" miny="14.56289673" maxx="-61.02950287" maxy="54.56289673"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.8</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">true</ol:singleTile></Extension></Layer></LayerList
></ViewContext>';
+ var polar = '<ViewContext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:default="http://www.opengis.net/context" xmlns:ol="http://openlayers.org/context" xmlns="http://www.opengis.net/context" xmlns:wms="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1.0" id="OpenLayers_Context_466" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd"><General><BoundingBox minx="-3000000" miny="-3000000" maxx="7000000" maxy="7000000" SRS="EPSG:32661"/><Title>WMS viewer</Title><Extension><ol:maxExtent minx="-3000000" miny="-3000000" maxx="7000000" maxy="7000000"/><ol:units>m</ol:units></Extension></General><LayerList xmlns="http://www.opengis.net/context"><Layer queryable="0" hidden="0"><Server service="OGC:WMS" version="1.1.1" foo="bar"><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://wms.met.no/maps/northpole.map"/></Server><Name>world</Na
me><Title>The World</Title><FormatList><Format>image/jpeg</Format><Format current="1">image/png</Format></FormatList></Layer></LayerList></ViewContext>';
function test_Format_WMC_read(t) {
- t.plan(36);
+ t.plan(37);
var format = new OpenLayers.Format.WMC();
var map, layer;
@@ -53,7 +54,7 @@
map.destroy();
// test v1.1.0
- var map = format.read(v1_1_0, {map: "map"});
+ map = format.read(v1_1_0, {map: "map"});
t.eq(map.center.lon.toPrecision(6), (-95).toPrecision(6), "(v1.1.0) map center correctly set");
t.eq(map.center.lat.toPrecision(6), (34.5).toPrecision(6), "(v1.1.0) map center correctly set");
t.eq(map.maxExtent.left.toPrecision(6), (-130).toPrecision(6), "(v1.1.0) map maxExtent correctly set");
@@ -91,8 +92,14 @@
"(v1.1.0) layer opacity correctly set");
map.destroy();
+ // Check if maxResolution is set correctly
+ map = format.read(polar, {map: "map"});
+ t.eq(map.maxResolution, 39062.5,
+ "maxResolution correctly set");
+ map.destroy();
+
// test mapOptions
- var map = format.read(v1_1_0, {map: {foo: 'bar', div: 'map'}});
+ map = format.read(v1_1_0, {map: {foo: 'bar', div: 'map'}});
t.eq(map.foo, "bar",
"mapOptions correctly passed to the created map object");
map.destroy();
Modified: sandbox/cmoullet/openlayers/tests/Format/WMSGetFeatureInfo.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Format/WMSGetFeatureInfo.html 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/tests/Format/WMSGetFeatureInfo.html 2011-03-29 09:48:36 UTC (rev 11742)
@@ -4,7 +4,7 @@
<script type="text/javascript">
function test_read_FeatureInfoResponse(t) {
- t.plan(5);
+ t.plan(7);
var parser = new OpenLayers.Format.WMSGetFeatureInfo();
@@ -49,6 +49,25 @@
t.eq(features[1].attributes.STATE_NAME, 'Wyoming',
"Attribute STATE_NAME contains the right value");
+ text = '<FeatureInfoResponse>' +
+ '<FIELDS>' +
+ '<FIELD name="ID" value="B31A0154"/>' +
+ '<FIELD name="FID" value="31AL0011"/>' +
+ '</FIELDS>' +
+ '<FIELDS>' +
+ '<FIELD name="ID" value="B31A0153"/>' +
+ '<FIELD name="FID" value="31AL0011"/>' +
+ '</FIELDS>' +
+ '</FeatureInfoResponse>';
+
+ features = parser.read(text);
+
+ t.eq(features.length, 2,
+ "Parsed 2 features in total");
+
+ t.eq(features[1].attributes.FID, '31AL0011',
+ "Attribute FID contains the right value");
+
}
function test_read_msGMLOutput(t) {
Modified: sandbox/cmoullet/openlayers/theme/default/img/editing_tool_bar.png
===================================================================
(Binary files differ)
Modified: sandbox/cmoullet/openlayers/theme/default/style.css
===================================================================
--- sandbox/cmoullet/openlayers/theme/default/style.css 2011-03-29 09:44:07 UTC (rev 11741)
+++ sandbox/cmoullet/openlayers/theme/default/style.css 2011-03-29 09:48:36 UTC (rev 11742)
@@ -137,18 +137,6 @@
padding:5px;
overflow: auto;
}
-.olControlNavToolbar {
- width:0px;
- height:0px;
-}
-.olControlNavToolbar div {
- display:block;
- width: 28px;
- height: 28px;
- top: 300px;
- left: 6px;
- position: relative;
-}
.olControlNavigationHistory {
background-image: url("img/navigation_history.png");
@@ -170,61 +158,6 @@
background-position: -24px -24px;
}
-.olControlNavToolbar .olControlNavigationItemActive {
- background-image: url("img/panning-hand-on.png");
- background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlNavigationItemInactive {
- background-image: url("img/panning-hand-off.png");
- background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlZoomBoxItemActive {
- background-image: url("img/drag-rectangle-on.png");
- background-color: orange;
- background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlZoomBoxItemInactive {
- background-image: url("img/drag-rectangle-off.png");
- background-repeat: no-repeat;
-}
-.olControlEditingToolbar {
- top: 0px;
- right: 0px;
- height: 30px;
- width: 200px;
-}
-.olControlEditingToolbar div {
- background-image: url("img/editing_tool_bar.png");
- background-repeat: no-repeat;
- float:right;
- width: 24px;
- height: 24px;
- margin: 5px;
-}
-.olControlEditingToolbar .olControlNavigationItemActive {
- background-position: -103px -23px;
-}
-.olControlEditingToolbar .olControlNavigationItemInactive {
- background-position: -103px -0px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePointItemActive {
- background-position: -77px -23px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePointItemInactive {
- background-position: -77px -0px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePathItemInactive {
- background-position: -51px 0px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePathItemActive {
- background-position: -51px -23px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive {
- background-position: -26px 0px;
-}
-.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive {
- background-position: -26px -23px ;
-}
div.olControlSaveFeaturesItemActive {
background-image: url(img/save_features_on.png);
background-repeat: no-repeat;
@@ -421,3 +354,68 @@
.olBingAttribution.road {
color: #333;
}
+
+/**
+ * Editing and navigation icons.
+ * (using the editing_tool_bar.png sprint image)
+ */
+.olControlNavToolbar ,
+.olControlEditingToolbar {
+ margin: 5px 5px 0px 0px;
+}
+.olControlNavToolbar div,
+.olControlEditingToolbar div {
+ background-image: url("img/editing_tool_bar.png");
+ background-repeat: no-repeat;
+ margin: 0px 0px 5px 5px;
+ width: 24px;
+ height: 22px;
+ cursor: pointer
+}
+/* positions */
+.olControlEditingToolbar {
+ right: 0px;
+ top: 0px;
+ width: 200px; /* Only for IE6 or IE without DOCTYPE */
+}
+.olControlNavToolbar {
+ top: 295px;
+ left: 9px;
+}
+/* layouts */
+.olControlEditingToolbar div {
+ float: right;
+}
+/* individual controls */
+.olControlNavToolbar .olControlNavigationItemInactive,
+.olControlEditingToolbar .olControlNavigationItemInactive {
+ background-position: -103px -1px;
+}
+.olControlNavToolbar .olControlNavigationItemActive ,
+.olControlEditingToolbar .olControlNavigationItemActive {
+ background-position: -103px -24px;
+}
+.olControlNavToolbar .olControlZoomBoxItemInactive {
+ background-position: -128px -1px;
+}
+.olControlNavToolbar .olControlZoomBoxItemActive {
+ background-position: -128px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePointItemInactive {
+ background-position: -77px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePointItemActive {
+ background-position: -77px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePathItemInactive {
+ background-position: -51px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePathItemActive {
+ background-position: -51px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive{
+ background-position: -26px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive {
+ background-position: -26px -24px;
+}
More information about the Commits
mailing list