While developing a user interface using Ext.viewport and GeoExt, gx_mappanel tricked me.I'm using OpenStreetMap as base layer and a vector layer.Both layers works fine when I use Openlayers alone for visualization. But not work when I use gx_mappanel as shown in the code. console of my Firebug shows the warning message as follows:

window.controllers is deprecated. Do not use it for UA detection. OpenLayers.js:1171 Use of inputEncoding is deprecated. Can this warning be the case?

Please look at the code and help. I tried several times without success, It is for fist time that I'm using GeoExt. I think what I lack is the properties of gx_mappanel.

var options = {

        projection: mapprojection,
        units: 'm'


var map = new OpenLayers.Map(options);

      map.addControl(new OpenLayers.Control.ScaleLine());

  var layer = new OpenLayers.Layer.OSM();


  var vStyle = new OpenLayers.StyleMap({
  fillOpacity: 1, fillColor: '#ee9900'


var vLayer=new OpenLayers.Layer.Vector("vLayer",



        strategies:[new OpenLayers.Strategy.Fixed()],

        protocol:new OpenLayers.Protocol.HTTP({

            url: "myserverscript", 

            format: new OpenLayers.Format.GeoJSON()


        styleMap: vStyle



new Ext.Viewport({

layout: "border",


        region: 'east',

        id: "form",

        title: 'some title',

        width: 200,

        collapsible: true,

        items: [plantInfo]

        region: "center",

        id: "mappanel",

        title: "map goes here",

        xtype: "gx_mappanel",

        center: new OpenLayers.LonLat(9.05, 51.20).transform( 

                new OpenLayers.Projection("EPSG:4326"), 

                new OpenLayers.Projection("EPSG:900913") ), 

        map: map,


  • Which versions of Openlayers,GeoExt and ExtJs do you use? – Thomas B Jan 27 '15 at 6:43
  • I'm using Openlayers 2.1, Geoext 1.1 and Extjs4 – Enkosa Jan 27 '15 at 7:28
  • There you are.for Geoext 1.x you need Extjs 3.x – Thomas B Jan 27 '15 at 7:30
  • you mean that Extjs4 cannot be used with Geoext1.x? – Enkosa Jan 27 '15 at 7:42
  • yes. see geoext.org: "A notice about GeoExt versions This website is about GeoExt 1.x, based on Ext JS 3. There is also a version of GeoExt that is capable of working on top of the newest Ext JS: GeoExt 2." – Thomas B Jan 27 '15 at 8:29

Try to use Extjs 3.4 instead of ExtJS4:

    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.4.0/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.4.0/ext-all.js"></script>
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.4.0/resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.4.0/examples/shared/examples.css" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.