[Commits] r2699 - sandbox/gxm/geoext/gxm/examples

commits at geoext.org commits at geoext.org
Tue May 17 10:02:17 CEST 2011


Author: marcjansen
Date: 2011-05-17 10:02:17 +0200 (Tue, 17 May 2011)
New Revision: 2699

Modified:
   sandbox/gxm/geoext/gxm/examples/mappanel.html
   sandbox/gxm/geoext/gxm/examples/mappanel.js
Log:
  - minor updates to the MapPanel example

Modified: sandbox/gxm/geoext/gxm/examples/mappanel.html
===================================================================
--- sandbox/gxm/geoext/gxm/examples/mappanel.html	2011-05-16 19:45:56 UTC (rev 2698)
+++ sandbox/gxm/geoext/gxm/examples/mappanel.html	2011-05-17 08:02:17 UTC (rev 2699)
@@ -4,6 +4,9 @@
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
         <title>GXM: Examples of the GXM.MapPanel-class</title>
+
+        <meta name="viewport" content="width=device-width, user-scalable=false, initial-scale=1.0, maximum-scale=1.0;">
+        <meta name="apple-mobile-web-app-capable" content="yes">
         
         <link rel="stylesheet" href="../external/sencha-touch-1.1.0/resources/css/sencha-touch.css" type="text/css">
         <link rel="stylesheet" href="../external/OpenLayers.r11966/theme/default/style.css" type="text/css">

Modified: sandbox/gxm/geoext/gxm/examples/mappanel.js
===================================================================
--- sandbox/gxm/geoext/gxm/examples/mappanel.js	2011-05-16 19:45:56 UTC (rev 2698)
+++ sandbox/gxm/geoext/gxm/examples/mappanel.js	2011-05-17 08:02:17 UTC (rev 2699)
@@ -1,5 +1,5 @@
 //TODO: remove eventually
-log = function(){
+var log = function(){
   if ( console && console.log ) {
       for (arg in arguments) {
           console.log(arguments[arg]);
@@ -23,21 +23,20 @@
         
         map.addLayers([ol_wms]);
         
-        var strS = '<span class="string">';
-        var strE = '</span>';
-        var comS = '<span class="comment">';
-        var comE = '</span>';
-        var numS = '<span class="number">';
-        var numE = '</span>';
+        var strS = '<span class="string">',
+            strE = '</span>',
+            comS = '<span class="comment">',
+            comE = '</span>',
+            numS = '<span class="number">',
+            numE = '</span>';
         
-        var ind = '    ';
+        var ind = '  ';
         var lazyMapPanel = {
             xtype: 'gxm_mappanel',
             map: map,
-            title: 'lazy w/ map',
+            title: 'MapPanel',
             sourceCode: [
-                '<pre class="example-code">',
-                '{',
+                '<pre class="example-code">{',
                 ind + 'xtype : ' + strS + '"gxm_mappanel"' + strE + ',',
                 ind + comS + '// A reference to' + comE,
                 ind + comS + '// an OpenLayers.Map' + comE,
@@ -52,10 +51,9 @@
             layers: [
                 ol_wms.clone()
             ],
-            title: 'lazy w/ layers',
+            title: '&hellip; layers',
             sourceCode: [
-                '<pre class="example-code">',
-                '{',
+                '<pre class="example-code">{',
                 ind + 'xtype  : ' + strS + '"gxm_mappanel"' + strE + ',',
                 ind + 'layers : [',
                 ind + ind + comS + '// A reference to' + comE,
@@ -76,17 +74,16 @@
                 51
             ],
             zoom: 11,
-            title: 'explicit w/ center',
+            title: '&hellip; center',
             sourceCode: [
-                '<pre class="example-code">',
-                'new GXM.MapPanel( {',
+                '<pre class="example-code">new GXM.MapPanel( {',
                 ind + 'layers : [',
                 ind + ind + 'myLayer',
                 ind + '],',
                 ind + comS + '// pass as array, as string' + comE,
                 ind + comS + '// or OpenLayers.LonLat-instance' + comE,
                 ind + 'center : [',
-                ind + ind + numS + '8' + numE,
+                ind + ind + numS + '8' + numE + ',',
                 ind + ind + numS + '51' + numE,
                 ind + '],',
                 ind + comS + '// pass an integer as zoom' + comE,
@@ -101,10 +98,9 @@
                 ol_wms.clone()
             ],
             extent: '7,51,8,52',
-            title: 'explicit w/ extent',
+            title: '&hellip; extent',
             sourceCode: [
-                '<pre class="example-code">',
-                'new GXM.MapPanel( {',
+                '<pre class="example-code">new GXM.MapPanel( {',
                 ind + 'layers : [',
                 ind + ind + 'myLayer',
                 ind + '],',
@@ -141,15 +137,12 @@
                         text: 'Source',
                         handler: function() {
                             var overlay = new Ext.Panel({
-                               floating: true,
+                                floating: true,
                                 modal: true,
                                 centered: false,
-                                width: Ext.is.Phone ? 260 : 400,
-                                height: Ext.is.Phone ? 220 : 400,
                                 styleHtmlContent: true,
-                                scroll: 'vertical',
-                                html: viewport.getActiveItem().sourceCode,
-                                cls: 'htmlcontent'
+                                scroll: 'both',
+                                html: viewport.getActiveItem().sourceCode
                             });
                             overlay.showBy(this);
                         }



More information about the Commits mailing list