On Sep 6, 2011, at 10:52 , Andreas Hocevar wrote:

> 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.

Actually scratch that. Only sources from MAP_BASELAYERSOURCES that are used by 
one of the layers in MAP_BASELAYERS show up in the Available Layers dropdown.

The only other way for adding a permanent layer source right now is to modify 
geonode/maps/models.py and add it in the uniquify method (see 
https://github.com/GeoNode/geonode/blob/master/src/GeoNodePy/geonode/maps/models.py#L1281).

Andreas. 

> 
>> 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.
> 

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

Reply via email to