[OpenLayers-Commits] r11400 -
sandbox/camptocamp/mobile/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Feb 24 05:57:56 EST 2011
Author: pgiraud
Date: 2011-02-24 02:57:56 -0800 (Thu, 24 Feb 2011)
New Revision: 11400
Modified:
sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html
sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js
Log:
Separating base and overlay layers, styling
Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html 2011-02-24 10:49:34 UTC (rev 11399)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html 2011-02-24 10:57:56 UTC (rev 11400)
@@ -108,7 +108,7 @@
<h1>Layers</h1>
</div>
<div data-role="content">
- <ul data-role="listview" data-inset="true" id="layerslist">
+ <ul data-role="listview" data-inset="true" data-theme="d" data-dividertheme="c" id="layerslist">
</div>
</div>
</body>
Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js 2011-02-24 10:49:34 UTC (rev 11399)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js 2011-02-24 10:57:56 UTC (rev 11400)
@@ -81,9 +81,25 @@
});
$('#layerslist').listview();
- $.each(map.layers, function() {
+ $('<li>', {
+ "data-role": "list-divider",
+ text: "Base Layers"
+ })
+ .appendTo('#layerslist');
+ var baseLayers = map.getLayersBy("isBaseLayer", true);
+ $.each(baseLayers, function() {
addLayerToList(this);
});
+
+ $('<li>', {
+ "data-role": "list-divider",
+ text: "Overlay Layers"
+ })
+ .appendTo('#layerslist');
+ var overlayLayers = map.getLayersBy("isBaseLayer", false);
+ $.each(overlayLayers, function() {
+ addLayerToList(this);
+ });
$('#layerslist').listview('refresh');
map.events.register("addlayer", this, function(e) {
More information about the Commits
mailing list