[Users] configuring layers in geoexplorer

Lemarchand, Johan lemarchandjo at who.int
Tue Jun 30 13:54:41 CEST 2009


Hi,

I have downloaded the latest release of GeoExplorer with the new GeoExt.
I am trying to configure the layers added at the initialization of the
application. It seems that the layers options such as the style, format,
minScale, maxScale, etc... are not passed in when the application is
activated. Is it the correct way to initialize the GeoExplorer? Is it
covered in the current release or will it be covered later?

<script>
   Ext.BLANK_IMAGE_URL = "theme/img/blank.gif";
   var app = new GeoExplorer.Embed({
   proxy: "/proxy/?url=",
   ows: {
        "demo": "http://demo.opengeo.org/geoserver/ows/"
   },
   map: {
         layers: [{
              name: "topp:states",
		  queryable: true,
		  formats: "image/gif",
		  styles: "polygon",
              ows: "demo",
              background: true,
              visibility:true
          },{
              name: "topp:bluemarble",
              ows: "demo",
              visibility: false,
              background: true  
          }],
              center: [-96.7, 37.6],
              zoom: 4
           }
      });
</script>

thanks in advance,
Johan Lemarchand
Public Health Information and GIS (GIS)
Health Statistics and Informatics (HSI)
Information Evidence and Research (IER)
World Health Organization
Tel: +41 22 791 1076 
Mobile: +41 79 517 4205
Email: lemarchandjo at who.int



More information about the Users mailing list