[Commits] r2144 - in sandbox/bartvde/playground/geoext: build examples lib/GeoExt/data lib/GeoExt/plugins lib/GeoExt/widgets lib/GeoExt/widgets/tree tests/lib/GeoExt/data tests/lib/GeoExt/widgets tests/lib/GeoExt/widgets/tree
commits at geoext.org
commits at geoext.org
Thu Apr 29 13:11:09 CEST 2010
Author: bartvde
Date: 2010-04-29 13:11:09 +0200 (Thu, 29 Apr 2010)
New Revision: 2144
Modified:
sandbox/bartvde/playground/geoext/build/Makefile
sandbox/bartvde/playground/geoext/examples/attribute-form.html
sandbox/bartvde/playground/geoext/examples/attributes.html
sandbox/bartvde/playground/geoext/examples/feature-grid.html
sandbox/bartvde/playground/geoext/examples/layercontainer.html
sandbox/bartvde/playground/geoext/examples/layeropacityslider.html
sandbox/bartvde/playground/geoext/examples/legendpanel.html
sandbox/bartvde/playground/geoext/examples/mappanel-div.html
sandbox/bartvde/playground/geoext/examples/mappanel-viewport.html
sandbox/bartvde/playground/geoext/examples/mappanel-window.html
sandbox/bartvde/playground/geoext/examples/permalink.html
sandbox/bartvde/playground/geoext/examples/popup.html
sandbox/bartvde/playground/geoext/examples/print-extent.html
sandbox/bartvde/playground/geoext/examples/print-form.html
sandbox/bartvde/playground/geoext/examples/print-page.html
sandbox/bartvde/playground/geoext/examples/print-preview.html
sandbox/bartvde/playground/geoext/examples/renderer.html
sandbox/bartvde/playground/geoext/examples/search-form.html
sandbox/bartvde/playground/geoext/examples/toolbar.html
sandbox/bartvde/playground/geoext/examples/tree.html
sandbox/bartvde/playground/geoext/examples/vector-legend.html
sandbox/bartvde/playground/geoext/examples/wms-capabilities.html
sandbox/bartvde/playground/geoext/examples/zoom-chooser.html
sandbox/bartvde/playground/geoext/examples/zoomslider.html
sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeReader.js
sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeStore.js
sandbox/bartvde/playground/geoext/lib/GeoExt/data/LayerStore.js
sandbox/bartvde/playground/geoext/lib/GeoExt/plugins/PrintPageField.js
sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/VectorLegend.js
sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/LayerLoader.js
sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeReader.html
sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeStore.html
sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/LayerStore.html
sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/VectorLegend.html
sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/tree/RadioButtonMixin.html
Log:
update sandbox from trunk
Modified: sandbox/bartvde/playground/geoext/build/Makefile
===================================================================
--- sandbox/bartvde/playground/geoext/build/Makefile 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/build/Makefile 2010-04-29 11:11:09 UTC (rev 2144)
@@ -48,7 +48,7 @@
mkdir -p $(LIB_NAME)/script $(LIB_NAME)/resources/css
jsbuild full.cfg -v -o $(LIB_NAME)/script/ -j GeoExt.js
- echo "GeoExt.VERSION_NUMBER='$(VERSION)';" >> $(LIB_NAME)/script/GeoExt.js
+ echo "GeoExt.version='$(VERSION)';" >> $(LIB_NAME)/script/GeoExt.js
rsync -au --exclude=.svn `pwd`/../resources `pwd`/$(LIB_NAME)
Modified: sandbox/bartvde/playground/geoext/examples/attribute-form.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/attribute-form.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/attribute-form.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="attribute-form.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/attributes.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/attributes.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/attributes.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="attributes.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/feature-grid.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/feature-grid.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/feature-grid.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="feature-grid.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/layercontainer.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/layercontainer.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/layercontainer.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="layercontainer.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/layeropacityslider.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/layeropacityslider.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/layeropacityslider.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.com/deploy/dev/examples/shared/examples.css"></link>
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<style type="text/css">
.x-tree-node-leaf .gx-tree-layer-icon {
Modified: sandbox/bartvde/playground/geoext/examples/legendpanel.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/legendpanel.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/legendpanel.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="legendpanel.js"></script>
@@ -25,4 +25,4 @@
<p>The js is not minified so it is readable. See <a href="legendpanel.js">legendpanel.js</a>.</p>
<div id="view"></div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: sandbox/bartvde/playground/geoext/examples/mappanel-div.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/mappanel-div.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/mappanel-div.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="mappanel-div.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/mappanel-viewport.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/mappanel-viewport.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/mappanel-viewport.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -11,7 +11,7 @@
-->
<!-- Google Maps API for "dev.geoext.org" -->
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA_5ak-hsiH4j5bQQn7-k66xTWxvN8zH6Ta_pgIhhU0TB7bG8iAhS99ituPif4lG-2CHXoZ3qenLnK1g'></script>
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="mappanel-viewport.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/mappanel-window.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/mappanel-window.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/mappanel-window.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="mappanel-window.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/permalink.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/permalink.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/permalink.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.0.0/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.0.0/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.0.0/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="permalink.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/popup.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/popup.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/popup.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
<link rel="stylesheet" type="text/css" href="../resources/css/geoext-all-debug.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="popup.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/print-extent.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/print-extent.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/print-extent.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://www.openlayers.org/dev/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="print-extent.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/print-form.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/print-form.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/print-form.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="print-form.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/print-page.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/print-page.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/print-page.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="print-page.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/print-preview.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/print-preview.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/print-preview.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="print-preview.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/renderer.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/renderer.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/renderer.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -4,7 +4,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script src="renderer.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/search-form.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/search-form.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/search-form.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -3,7 +3,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="search-form.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/toolbar.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/toolbar.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/toolbar.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="toolbar.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/tree.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/tree.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/tree.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="tree.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/vector-legend.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/vector-legend.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/vector-legend.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2.1/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="vector-legend.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/wms-capabilities.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/wms-capabilities.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/wms-capabilities.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="wms-capabilities.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/zoom-chooser.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/zoom-chooser.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/zoom-chooser.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="zoom-chooser.js"></script>
Modified: sandbox/bartvde/playground/geoext/examples/zoomslider.html
===================================================================
--- sandbox/bartvde/playground/geoext/examples/zoomslider.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/examples/zoomslider.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -5,7 +5,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
- <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
+ <script src="http://www.openlayers.org/api/2.9/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/GeoExt.js"></script>
<script type="text/javascript" src="zoomslider.js"></script>
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeReader.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeReader.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeReader.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -29,6 +29,9 @@
* an ``OpenLayers.Format.WFSDescribeFeatureType`` parser.
* * ignore - ``Object`` Properties of the ignore object should be field names.
* Values are either arrays or regular expressions.
+ * * feature - ``OpenLayers.Feature.Vector`` A vector feature. If provided
+ * records created by the reader will include a field named "value"
+ * referencing the attribute value as set in the feature.
*/
GeoExt.data.AttributeReader = function(meta, recordType) {
meta = meta || {};
@@ -38,6 +41,9 @@
GeoExt.data.AttributeReader.superclass.constructor.call(
this, meta, recordType || meta.fields
);
+ if(meta.feature) {
+ this.recordType.prototype.fields.add(new Ext.data.Field("value"));
+ }
};
Ext.extend(GeoExt.data.AttributeReader, Ext.data.DataReader, {
@@ -77,10 +83,11 @@
// only works with one featureType in the doc
attributes = this.meta.format.read(data).featureTypes[0].properties;
}
+ var feature = this.meta.feature;
var recordType = this.recordType;
var fields = recordType.prototype.fields;
var numFields = fields.length;
- var attr, values, name, record, ignore, matches, value, records = [];
+ var attr, values, name, record, ignore, value, records = [];
for(var i=0, len=attributes.length; i<len; ++i) {
ignore = false;
attr = attributes[i];
@@ -88,20 +95,21 @@
for(var j=0; j<numFields; ++j) {
name = fields.items[j].name;
value = attr[name];
- if(this.meta.ignore && this.meta.ignore[name]) {
- matches = this.meta.ignore[name];
- if(typeof matches == "string") {
- ignore = (matches === value);
- } else if(matches instanceof Array) {
- ignore = (matches.indexOf(value) > -1);
- } else if(matches instanceof RegExp) {
- ignore = (matches.test(value));
+ if(this.ignoreAttribute(name, value)) {
+ ignore = true;
+ break;
+ }
+ values[name] = value;
+ }
+ if(feature) {
+ value = feature.attributes[values["name"]];
+ if(value !== undefined) {
+ if(this.ignoreAttribute("value", value)) {
+ ignore = true;
+ } else {
+ values["value"] = value;
}
- if(ignore) {
- break;
- }
}
- values[name] = attr[name];
}
if(!ignore) {
records[records.length] = new recordType(values);
@@ -113,7 +121,26 @@
records: records,
totalRecords: records.length
};
+ },
+ /** private: method[ignoreAttribute]
+ * :arg name: ``String`` The field name.
+ * :arg value: ``String`` The field value.
+ *
+ * :return: ``Boolean`` true if the attribute should be ignored.
+ */
+ ignoreAttribute: function(name, value) {
+ var ignore = false;
+ if(this.meta.ignore && this.meta.ignore[name]) {
+ var matches = this.meta.ignore[name];
+ if(typeof matches == "string") {
+ ignore = (matches === value);
+ } else if(matches instanceof Array) {
+ ignore = (matches.indexOf(value) > -1);
+ } else if(matches instanceof RegExp) {
+ ignore = (matches.test(value));
+ }
+ }
+ return ignore;
}
-
});
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeStore.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeStore.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/data/AttributeStore.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -1,6 +1,6 @@
/**
* Copyright (c) 2008-2010 The Open Source Geospatial Foundation
- *
+ *
* Published under the BSD license.
* See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
* of the license.
@@ -17,12 +17,136 @@
*/
Ext.namespace("GeoExt.data");
+/**
+ * Function: GeoExt.data.AttributeStoreMixin
+ *
+ * This function generates a mixin object to be used when extending an Ext.data.Store
+ * to create an attribute store.
+ *
+ * (start code)
+ * var AttrStore = Ext.extend(Ext.data.Store, GeoExt.data.AttributeStoreMixin);
+ * var store = new AttrStore();
+ * (end)
+ *
+ * For convenience, a GeoExt.data.AttributeStore class is available as a
+ * shortcut to the Ext.extend sequence in the above code snippet. The above
+ * is equivalent to:
+ * (start code)
+ * var store = new GeoExt.data.AttributeStore();
+ * (end)
+ */
+GeoExt.data.AttributeStoreMixin = function() {
+ return {
+ /** private */
+ constructor: function(c) {
+ c = c || {};
+ arguments.callee.superclass.constructor.call(
+ this,
+ Ext.apply(c, {
+ proxy: c.proxy || (!c.data ?
+ new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) :
+ undefined
+ ),
+ reader: new GeoExt.data.AttributeReader(
+ c, c.fields || ["name", "type", "restriction"]
+ )
+ })
+ );
+ if(this.feature) {
+ this.bind(this.feature);
+ }
+ },
+
+ /** private: method[bind]
+ * :param feature: ``OpenLayers.Feature.Vector``
+ */
+ bind: function(feature) {
+ this.on({
+ "update": this.onUpdate,
+ "load": this.onLoad,
+ "add": this.onAdd,
+ scope: this
+ });
+ },
+
+ /** private: method[onUpdate]
+ * :param store: ``Ext.data.Store``
+ * :param record: ``Ext.data.Record``
+ * :param operation: ``String``
+ *
+ * Handler for store update event.
+ */
+ onUpdate: function(store, record, operation) {
+ this.updateFeature([record]);
+ },
+
+ /** private: method[onLoad]
+ * :param store: ``Ext.data.Store``
+ * :param records: ``Array(Ext.data.Record)``
+ * :param options: ``Object``
+ *
+ * Handler for store load event
+ */
+ onLoad: function(store, records, options) {
+ // if options.add is true an "add" event was already
+ // triggered, and onAdd already did the work of
+ // adding the features to the layer.
+ if(!options || options.add !== true) {
+ this.updateFeature(records);
+ }
+ },
+
+ /** private: method[onAdd]
+ * :param store: ``Ext.data.Store``
+ * :param records: ``Array(Ext.data.Record)``
+ * :param index: ``Number``
+ *
+ * Handler for store add event
+ */
+ onAdd: function(store, records, index) {
+ this.updateFeature(records);
+ },
+
+ /** private: method[updateFeature]
+ * :param records: ``Array(Ext.data.Record)``
+ *
+ * Update feature from records.
+ */
+ updateFeature: function(records) {
+ var feature = this.feature, layer = feature.layer;
+ var record, name, value, oldValue, cont;
+ for(var i=0,len=records.length; i<len; i++) {
+ record = records[i];
+ name = record.get("name");
+ value = record.get("value");
+ oldValue = feature.attributes[name];
+ if(oldValue !== value) {
+ cont = true;
+ if(layer && layer.events) {
+ cont = layer.events.triggerEvent(
+ "beforefeaturemodified", {feature: feature});
+ }
+ if(cont !== false) {
+ feature.attributes[name] = value;
+ if(layer && layer.events) {
+ layer.events.triggerEvent(
+ "featuremodified", {feature: feature});
+ layer.drawFeature(feature);
+ }
+ }
+ }
+ }
+ }
+
+ };
+};
+
/** api: constructor
* .. class:: AttributeStore(config)
- *
+ *
* Small helper class to make creating stores for remotely-loaded attributes
* data easier. AttributeStore is pre-configured with a built-in
- * ``Ext.data.HttpProxy`` and :class:`Ext.data.AttributeReader`. The
+ * ``Ext.data.HttpProxy`` and :class:`GeoExt.data.AttributeReader`. The
* HttpProxy is configured to allow caching (disableCaching: false) and
* uses GET. If you require some other proxy/reader combination then you'll
* have to configure this with your own proxy or create a basic
@@ -42,19 +166,17 @@
* ``Ext.data.Record.create``, or a record constructor created using
* ``Ext.data.Record.create``. Defaults to ``["name", "type", "restriction"]``.
*/
-GeoExt.data.AttributeStore = function(c) {
- c = c || {};
- GeoExt.data.AttributeStore.superclass.constructor.call(
- this,
- Ext.apply(c, {
- proxy: c.proxy || (!c.data ?
- new Ext.data.HttpProxy({url: c.url, disableCaching: false, method: "GET"}) :
- undefined
- ),
- reader: new GeoExt.data.AttributeReader(
- c, c.fields || ["name", "type", "restriction"]
- )
- })
- );
-};
-Ext.extend(GeoExt.data.AttributeStore, Ext.data.Store);
+
+/** api: config[feature]
+ * ``OpenLayers.Feature.Vector``
+ * A vector feature. If provided, and if the reader is a
+ * :class:`GeoExt.data.AttributeReader` (the default), then records
+ * of this store will include a field named "value" referencing the
+ * corresponding attribute value in the feature. And if the "value"
+ * field of a record is updated the update will propagate to the
+ * corresponding feature attribute. Optional.
+ */
+GeoExt.data.AttributeStore = Ext.extend(
+ Ext.data.Store,
+ GeoExt.data.AttributeStoreMixin()
+);
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/data/LayerStore.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/data/LayerStore.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/data/LayerStore.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -380,6 +380,21 @@
this.removeMapLayer(oldRecord);
},
+ /** public: method[getByLayer]
+ * :param layer: ``OpenLayers.Layer``
+ * :return: :class:`GeoExt.data.LayerRecord` or undefined if not found
+ *
+ * Get the record for the specified layer
+ */
+ getByLayer: function(layer) {
+ var index = this.findBy(function(r) {
+ return r.get("layer") === layer;
+ });
+ if(index > -1) {
+ return this.getAt(index);
+ }
+ },
+
/** private: method[destroy]
*/
destroy: function() {
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/plugins/PrintPageField.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/plugins/PrintPageField.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/plugins/PrintPageField.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -57,7 +57,7 @@
* printPage: printPage
* })
* }]
- * }):
+ * });
*/
/** api: constructor
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/VectorLegend.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/VectorLegend.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/VectorLegend.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -54,7 +54,11 @@
* The symbol type for legend swatches. Must be one of ``"Point"``,
* ``"Line"``, or ``"Polygon"``. If not provided, the ``layer`` or
* ``layerRecord`` config property must be specified, and the geometry type
- * of the first feature found on the layer will be used.
+ * of the first feature found on the layer will be used. If a rule does
+ * not have a symbolizer for ``symbolType``, we look at the symbolizers
+ * for the rule, and see if it has a ``"Point"``, ``"Line"`` or
+ * ``"Polygon"`` symbolizer, which we use for rendering a swatch of the
+ * respective geometry type.
*/
symbolType: null,
@@ -434,12 +438,19 @@
*/
createRuleRenderer: function(rule) {
var symbolizer = rule.symbolizer;
- if (symbolizer[this.symbolType]) {
- symbolizer = symbolizer[this.symbolType];
+ var types = [this.symbolType, "Point", "Line", "Polygon"];
+ var type, haveType;
+ for(var i=0, len=types.length; i<len; ++i) {
+ type = types[i];
+ if(symbolizer[type]) {
+ symbolizer = symbolizer[type];
+ haveType = true;
+ break;
+ }
}
return {
xtype: "gx_renderer",
- symbolType: this.symbolType,
+ symbolType: haveType === true ? type : this.symbolType,
symbolizers: [symbolizer],
style: this.clickableSymbol ? {cursor: "pointer"} : undefined,
listeners: {
Modified: sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/LayerLoader.js
===================================================================
--- sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/LayerLoader.js 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/lib/GeoExt/widgets/tree/LayerLoader.js 2010-04-29 11:11:09 UTC (rev 2144)
@@ -212,11 +212,8 @@
*/
onChildMove: function(tree, node, oldParent, newParent, index) {
this._reordering = true;
- var oldRecordIndex = this.store.findBy(function(record) {
- return record.get("layer") === node.layer;
- });
// remove the record and re-insert it at the correct index
- var record = this.store.getAt(oldRecordIndex);
+ var record = this.store.getByLayer(node.layer);
if(newParent instanceof GeoExt.tree.LayerContainer &&
this.store === newParent.loader.store) {
Modified: sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeReader.html
===================================================================
--- sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeReader.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeReader.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -32,6 +32,38 @@
t.eq(record.get("restriction").maxLength, "2", "[3] correct attribute restriction");
}
+ function test_read_feature(t) {
+ t.plan(3);
+
+ // set up
+
+ var feature, reader, records, record;
+
+ feature = new OpenLayers.Feature.Vector(null, {
+ "STATE_FIPS": "foo"
+ });
+
+ // test
+
+ reader = new GeoExt.data.AttributeReader({
+ feature: feature
+ }, ["name", "type"]);
+ records = reader.read({responseXML : doc});
+ record = records.records[2];
+ t.eq(record.get("value"), "foo", "[1] correct attribute value");
+ record = records.records[1];
+ t.eq(record.get("value"), undefined, "[2] correct attribute value");
+
+ // test with a reader whose record type doesn't include
+ // a field named "name"
+ reader = new GeoExt.data.AttributeReader({
+ feature: feature
+ }, ["type"]);
+ records = reader.read({responseXML : doc});
+ record = records.records[2];
+ t.eq(record.get("value"), undefined, "[3] correct attribute value");
+ }
+
function test_ignoreString(t) {
t.plan(1);
Modified: sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeStore.html
===================================================================
--- sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeStore.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/AttributeStore.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -24,6 +24,173 @@
"ctor sets an Ext.data.HttpProxy in the store");
}
+ function test_grouping(t) {
+ t.plan(2);
+
+ var AttributeGroupingStore = Ext.extend(
+ Ext.data.GroupingStore,
+ GeoExt.data.AttributeStoreMixin()
+ );
+ var store = new AttributeGroupingStore();
+ t.ok(store instanceof AttributeGroupingStore,
+ "ctor creates an AttributeGroupingStore");
+ t.ok(store instanceof Ext.data.GroupingStore,
+ "ctor creates an Ext.data.GroupingStore");
+ }
+
+ function test_feature(t) {
+ t.plan(34);
+
+ // set up
+
+ var layer, feature, data, store, record
+ var onLoadLog, onAddLog;
+ var onBeforefeaturemodifiedLog, onFeaturemodifiedLog;
+
+ layer = new OpenLayers.Layer.Vector("vector", {
+ eventListeners: {
+ "beforefeaturemodified": function(e) {
+ onBeforefeaturemodifiedLog.push({feature: e.feature});
+ },
+ "featuremodified": function(e) {
+ onFeaturemodifiedLog.push({feature: e.feature});
+ }
+ }
+ });
+
+ feature = new OpenLayers.Feature.Vector(null, {
+ "foo0": "bar0",
+ "foo1": "bar1",
+ "foo2": "bar2",
+ "foo3": "bar3",
+ "foo4": null,
+ "foo5": undefined
+ });
+ layer.addFeatures(feature);
+
+ data = [{
+ "name": "foo0"
+ }, {
+ "name": "foo1"
+ }];
+
+ store = new GeoExt.data.AttributeStore({
+ feature: feature,
+ onLoad: function(store, records, index) {
+ onLoadLog.push({records: records});
+ GeoExt.data.AttributeStore.prototype.onLoad.apply(this, arguments);
+ },
+ onAdd: function(store, records, index) {
+ onAddLog.push({records: records});
+ GeoExt.data.AttributeStore.prototype.onAdd.apply(this, arguments);
+ }
+ });
+
+ // test
+
+ t.ok(store.feature === feature,
+ "feature is set in the store");
+ t.ok(store.reader.meta.feature === feature,
+ "feature is set in the reader's meta property");
+
+ onLoadLog = [], onBeforefeaturemodifiedLog = [], onFeaturemodifiedLog = [];
+ store.loadData(data);
+ record = store.getAt(0);
+ t.eq(onLoadLog.length, 1,
+ "onLoad called once on loadData");
+ t.eq(onLoadLog[0].records.length, 2,
+ "onLoad receiced expected number of records");
+ t.eq(onBeforefeaturemodifiedLog.length, 0,
+ "beforefeaturemodified not triggered");
+ t.eq(onFeaturemodifiedLog.length, 0,
+ "featuremodified not triggered");
+ t.eq(record.get("name"), "foo0",
+ "[0] record name is correct");
+ t.eq(record.get("value"), "bar0",
+ "[0] record value is correct");
+ record = store.getAt(1);
+ t.eq(record.get("name"), "foo1",
+ "[1] record name is correct");
+ t.eq(record.get("value"), "bar1",
+ "[1] record value is correct");
+
+ onBeforefeaturemodifiedLog = [], onFeaturemodifiedLog = [];
+ record = store.getAt(0);
+ record.set("value", "bar00");
+ t.eq(onBeforefeaturemodifiedLog.length, 1,
+ "beforefeaturemodified triggered once");
+ t.eq(onFeaturemodifiedLog.length, 1,
+ "featuremodified triggered once");
+ t.eq(feature.attributes.foo0, "bar00",
+ "feature attribute foo0 updated");
+ t.eq(feature.attributes.foo1, "bar1",
+ "feature attribute foo1 not updated");
+
+ onAddLog = [];
+ store.loadData([{"name": "foo2"}], true);
+ t.eq(onAddLog.length, 1,
+ "onAdd called once on loadData");
+ t.eq(onAddLog[0].records.length, 1,
+ "onAdd received expected number of records");
+ record = store.getAt(2);
+ t.eq(record.get("name"), "foo2",
+ "[2] record name is correct");
+ t.eq(record.get("value"), "bar2",
+ "[2] record value is correct");
+
+ // attribute with value in feature (should be kept)
+ onBeforefeaturemodifiedLog = [], onFeaturemodifiedLog = [];
+ store.loadData([{"name": "foo3", "value": "bar30"}], true);
+ t.eq(onBeforefeaturemodifiedLog.length, 0,
+ "beforefeaturemodified not triggered");
+ t.eq(onFeaturemodifiedLog.length, 0,
+ "featuremodified not triggered");
+ record = store.getAt(3);
+ t.eq(record.get("value"), "bar3",
+ "record value is correct, read from feature");
+ t.eq(feature.attributes.foo3, "bar3",
+ "feature attribute foo3 not updated, initial value kept");
+
+ // attribute with null value in feature (should be kept)
+ store.loadData([{"name": "foo4", "value": "bar4"}], true);
+ t.eq(onBeforefeaturemodifiedLog.length, 0,
+ "beforefeaturemodified not triggered");
+ t.eq(onFeaturemodifiedLog.length, 0,
+ "featuremodified not triggered");
+ record = store.getAt(4);
+ t.ok(record.get("value") === null,
+ "record value is correct, read from feature");
+ t.ok(feature.attributes.foo4 === null,
+ "feature attribute foo4 not updated, initial value kept");
+
+ // attribute with undefined value in feature (should be overridden)
+ store.loadData([{"name": "foo5", "value": "bar5"}], true);
+ t.eq(onBeforefeaturemodifiedLog.length, 1,
+ "beforefeaturemodified triggered");
+ t.eq(onFeaturemodifiedLog.length, 1,
+ "featuremodified triggered");
+ record = store.getAt(5);
+ t.eq(record.get("value"), "bar5",
+ "record value is correct, read from data");
+ t.eq(feature.attributes.foo5, "bar5",
+ "feature attribute foo5 updated");
+
+ // attribute missing in feature
+ onBeforefeaturemodifiedLog = [], onFeaturemodifiedLog = [];
+ store.loadData([{"name": "foo6", "value": "bar6"}], true);
+ t.eq(onBeforefeaturemodifiedLog.length, 1,
+ "beforefeaturemodified triggered");
+ t.eq(onFeaturemodifiedLog.length, 1,
+ "featuremodified triggered");
+ record = store.getAt(6);
+ t.eq(record.get("value"), "bar6",
+ "record value is correct, read from data");
+ t.eq(feature.attributes.foo6, "bar6",
+ "feature attribute foo6 added, with correct value");
+
+ // tear down
+ }
+
</script>
<body>
<div id="map"></div>
Modified: sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/LayerStore.html
===================================================================
--- sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/LayerStore.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/tests/lib/GeoExt/data/LayerStore.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -334,6 +334,25 @@
map.destroy();
}
+ function test_getByLayer(t) {
+ t.plan(2);
+
+ var layers = [
+ new OpenLayers.Layer("layer1"),
+ new OpenLayers.Layer("layer2")
+ ];
+
+ var store = new GeoExt.data.LayerStore({
+ layers: layers
+ });
+
+ var record = store.getByLayer(layers[1]);
+ t.ok(record.get("layer") === layers[1], "correct layer record returned");
+
+ record = store.getByLayer(new OpenLayers.Layer("other layer"));
+ t.eq(record, undefined, "getByLayer returns undefined if layer is not in store");
+ }
+
function test_events(t) {
t.plan(21);
Modified: sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/VectorLegend.html
===================================================================
--- sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/VectorLegend.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/VectorLegend.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -7,7 +7,7 @@
<script>
function test_constructor(t) {
- t.plan(5);
+ t.plan(7);
var legend;
@@ -23,7 +23,12 @@
renderTo: "legendpanel",
rules: [
new OpenLayers.Rule({title: "first rule"}),
- new OpenLayers.Rule({title: "second rule"})
+ new OpenLayers.Rule({
+ title: "second rule",
+ symbolizer: {
+ "Polygon": {strokeColor: "blue"}
+ }
+ })
],
symbolType: "Point"
});
@@ -39,6 +44,9 @@
// this should eventually become a container instead of a panel
t.ok(ruleTitleCmp.getEl().dom.innerHTML.indexOf("first rule") > -1, "correct title for first rule");
+ t.eq(ruleCmp.getComponent(0).feature.geometry.CLASS_NAME, "OpenLayers.Geometry.Point", "1st swatch uses a Point feature");
+ t.eq(legend.rulesContainer.getComponent(1).getComponent(0).feature.geometry.CLASS_NAME, "OpenLayers.Geometry.Polygon", "2nd swatch uses a Polygon feature");
+
legend.destroy();
}
Modified: sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/tree/RadioButtonMixin.html
===================================================================
--- sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/tree/RadioButtonMixin.html 2010-04-29 11:05:51 UTC (rev 2143)
+++ sandbox/bartvde/playground/geoext/tests/lib/GeoExt/widgets/tree/RadioButtonMixin.html 2010-04-29 11:11:09 UTC (rev 2144)
@@ -39,7 +39,7 @@
});
mapPanel.on("render", function() {
- t.ok(Ext.Element.get(node.ui.anchor.previousSibling).hasClass("gx-tree-radio"), "node has a radio button");
+ t.ok(Ext.fly(node.ui.getEl()).child(".gx-tree-radio"), "node has a radio button");
// simulate a click event for testing the radiochange event
node.ui.onClick({getTarget: function() {return true}});
});
More information about the Commits
mailing list