[OpenLayers-Commits] r11431 - sandbox/camptocamp/mobile/openlayers/examples

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 24 11:29:53 EST 2011


Author: pgiraud
Date: 2011-02-24 08:29:53 -0800 (Thu, 24 Feb 2011)
New Revision: 11431

Modified:
   sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html
   sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js
Log:
Removing tabs

Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html	2011-02-24 16:21:04 UTC (rev 11430)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.html	2011-02-24 16:29:53 UTC (rev 11431)
@@ -62,14 +62,14 @@
           </div>
         </div>
 
-		<div id="popup" data-role="dialog">
-			<div data-position="inline" data-theme="d" data-role="header">
-				<h1>Details</h1>
-			</div>
-			<div data-theme="c" data-role="content">
-				<ul id="details-list" data-role="listview">
-				</ul>
-			</div>
-		</div>
+        <div id="popup" data-role="dialog">
+            <div data-position="inline" data-theme="d" data-role="header">
+                <h1>Details</h1>
+            </div>
+            <div data-theme="c" data-role="content">
+                <ul id="details-list" data-role="listview">
+                </ul>
+            </div>
+        </div>
     </body>
 </html>

Modified: sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js
===================================================================
--- sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js	2011-02-24 16:21:04 UTC (rev 11430)
+++ sandbox/camptocamp/mobile/openlayers/examples/mobile-jq.js	2011-02-24 16:29:53 UTC (rev 11431)
@@ -43,36 +43,36 @@
         }
     });
 
-	var sprintersLayer = new OpenLayers.Layer.Vector("Sprinters", {
+    var sprintersLayer = new OpenLayers.Layer.Vector("Sprinters", {
         styleMap: new OpenLayers.StyleMap({
             externalGraphic : "img/mobile-loc.png",
-			graphicOpacity : 1.0,
-			graphicWith:16,
-			graphicHeight:26
+            graphicOpacity : 1.0,
+            graphicWith:16,
+            graphicHeight:26
         })
     });
-	
-	var sprinters = getFeatures();
-	sprintersLayer.addFeatures(sprinters);
-	
-	map.addLayer(sprintersLayer);
-	
-	var selectControl = new OpenLayers.Control.SelectFeature(sprintersLayer, {onSelect: function(feature){
-		selectedFeature = feature;
-		$.mobile.changePage($("#popup"), "pop");
-	}});
-	
-	map.addControl(selectControl);
-	selectControl.activate();
-	
-	$('div#popup').live('pageshow',function(event, ui){
-	  	var li = "";
-		for(var attr in selectedFeature.attributes){
-			li += "<li><div style='width:25%;float:left'>" + attr + "</div><div style='width:75%;float:right'>" 
-			+ selectedFeature.attributes[attr] + "</div></li>";
-		}
-		$("ul#details-list").empty().append(li).listview("refresh");
-	});
+    
+    var sprinters = getFeatures();
+    sprintersLayer.addFeatures(sprinters);
+    
+    map.addLayer(sprintersLayer);
+    
+    var selectControl = new OpenLayers.Control.SelectFeature(sprintersLayer, {onSelect: function(feature){
+        selectedFeature = feature;
+        $.mobile.changePage($("#popup"), "pop");
+    }});
+    
+    map.addControl(selectControl);
+    selectControl.activate();
+    
+    $('div#popup').live('pageshow',function(event, ui){
+        var li = "";
+        for(var attr in selectedFeature.attributes){
+            li += "<li><div style='width:25%;float:left'>" + attr + "</div><div style='width:75%;float:right'>" 
+            + selectedFeature.attributes[attr] + "</div></li>";
+        }
+        $("ul#details-list").empty().append(li).listview("refresh");
+    });
 
     $('#searchpage').live('pageshow',function(event, ui){
         $('#query').bind('change', function(e){
@@ -167,25 +167,25 @@
 }
 
 function getFeatures(){
-	var features = {
+    var features = {
       "type": "FeatureCollection", 
       "features": [
-        	{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [1332700, 7906300]}, 
-			"properties": {"Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}},
-			{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [790300, 6573900]}, 
-			"properties": {"Name": "Marc Jansen", "Country":"Germany", "City":"Bonn"}},
-			{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [568600, 6817300]}, 
-			"properties": {"Name": "Bart van den Eijnden", "Country":"Netherlands", "City":"Utrecht"}},
-			{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [-7909900, 5215100]}, 
-			"properties": {"Name": "Christopher Schmidt", "Country":"United Stated", "City":"Boston"}},
-			{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [-937400, 5093200]}, 
-			"properties": {"Name": "Jorge Gustavo Rocha", "Country":"Portugal", "City":"Braga"}},
-			{ "type": "Feature", "geometry": {"type": "Point", "coordinates": [-355300, 7547800]}, 
-			"properties": {"Name": "Jennie Fletcher ", "Country":"Scotland", "City":"Edinburgh"}}
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1332700, 7906300]}, 
+            "properties": {"Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [790300, 6573900]}, 
+            "properties": {"Name": "Marc Jansen", "Country":"Germany", "City":"Bonn"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [568600, 6817300]}, 
+            "properties": {"Name": "Bart van den Eijnden", "Country":"Netherlands", "City":"Utrecht"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-7909900, 5215100]}, 
+            "properties": {"Name": "Christopher Schmidt", "Country":"United Stated", "City":"Boston"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-937400, 5093200]}, 
+            "properties": {"Name": "Jorge Gustavo Rocha", "Country":"Portugal", "City":"Braga"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-355300, 7547800]}, 
+            "properties": {"Name": "Jennie Fletcher ", "Country":"Scotland", "City":"Edinburgh"}}
        ]
-   	};
+    };
 
-	var reader = new OpenLayers.Format.GeoJSON();
-	
-	return reader.read(features);
+    var reader = new OpenLayers.Format.GeoJSON();
+    
+    return reader.read(features);
 }



More information about the Commits mailing list