Changes between Version 6 and Version 7 of mobile
- Timestamp:
- 08/18/11 08:24:10 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
mobile
v6 v7 123 123 }}} 124 124 125 We'll also include a file '''`gxm-example.js`''' in the `<head>` with the following content: 125 We'll also include a file '''`gxm-example.js`''' as last element in the `<head>` with the following content: 126 127 {{{ 128 alert('OpenLayers: ' + OpenLayers.VERSION_NUMBER); 129 alert('Sencha Touch: ' + Ext.version); 130 alert('GXM: ' + GXM.version); 131 }}} 132 133 If you visit that site with a browser you should be greeted with three alerts, and none of the alerts should contain the string `undefined`. If you see the string `undefined`, you will have to adjust the according path. 134 135 Next we are going to add a wrapper method that'll run all our instanciation code as soon as possible: 126 136 127 137 {{{ 128 138 Ext.setup({ 129 139 onReady: function(){ 130 alert('OpenLayers: ' + OpenLayers.VERSION_NUMBER); 131 alert('Sencha Touch: ' + Ext.version); 132 alert('GXM: ' + GXM.version); 140 alert('Replace this alert with actual code.'); 133 141 } 134 142 }); 135 143 }}} 136 144 137 If you visit that site with a browser you should be greeted with three alerts, and none of the alerts should contain the string undefined. 138 139 In the next step we will remove the above debugging code and start with the creation af a simple OpenLayers.Map. Place the following code inside of the onReady-method: 145 In the next step we will remove the above debugging alert and start with the creation af a simple OpenLayers.Map. Place the following code inside of the `onReady`-method: 140 146 141 147 {{{