Hi,

On Sep 5, 2011, at 17:05 , Patrick Krejci wrote:

> Hi David,
> sorry but I don't understand it, I thought that the MAP_BASELAYERSOURCES are 
> to set the sources of the MAP_BASELAYERS which are visible on the LayerTree 
> on the left side.

Yes, but these sources are also used for the Available Layers dropdown in the 
Add Layers dialog.

> I hope you understand my description above. But I want to add a Server to the 
> Available Layers Dialog which pops up if you create a new map oder press the 
> add new layer button. For that purpose the same variable MAP_BASELAYERSOURCES 
> is also responsible?

Yes indeed.

> Can you explain to me, what the ptype property does?

The ptype references a gxp plugin. See 
http://gxp.opengeo.org/master/doc/lib/plugins.html. And the default ptype is 
"gxp_wmscsource". So look at the "capra" source:

> MAP_BASELAYERSOURCES = {
>     "any": {
>         "ptype":"gx_olsource"
>     },
>     "capra": {
>         "url":"/geoserver/wms"
>     },
>     "google":{
>         "ptype":"gx_googlesource",
>         "apiKey": GOOGLE_API_KEY
>     }
> }

You can define an arbitrary WMS source the same way, e.g.

"my_wms": {
    "url": "http://my-wms/geoserver/wms";
}

Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

Reply via email to