[OpenLayers-Users] [write wmc for OpenLayers.Layer.OSM]

Bernard Grosdoy bernard.grosdoy at c-s.fr
Fri Sep 27 09:16:01 PDT 2013


First, I'm new on this list, maybe I will use it not really correctly.

I will probably ask for already answered questions.



Now my purpose.

I try to use in a production context Web Map Context.
The goal is to persist a user's wmc context in its "preference" in DB.

I started  form the wmc.html exemple ( OpenLayers-2.12))


I add 4 layers :
a google one
a osm one
two WMS "classics'

When I write the WMC only the two WMS ar in the final xml

It seems correct regarding to the lib  :  WMC.js around line 170

   for (var i=0, len=layers.length; i<len; i++) {
        var layer = layers[i];
            if (layer instanceof OpenLayers.Layer.WMS) {
context.layersContext.push(this.layerToContext(layer));
     }
    }


here are tests for my layers :
layer instanceof OpenLayers.Layer.OSM true -> not in wmc
layer instanceof OpenLayers.Layer.Google true -> not in wmc

layer instanceof OpenLayers.Layer.WMS true -> in wmc

Please how I can solve that  ?

thank you.



PS : in on line wmc sample a google layer is written in wmc ... ? other 
version  ?




-- 
<www.c-s.fr> 	*Bernard Grosdoy*
Ingénieur d'études et développements
*Business Unit E-SPACE & Geo Information* 
<https://thor.si.c-s.fr/blogs/cs-blogs-business/>*- Département 
APPLICATIONS*
Cellule Eau, Environnement, Risques

*CS Systèmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
Tel : +33 561 39 46 46 / Std : +33 561 17 66 66 / Fax : +33 561 34 84 15
Email : bernard.grosdoy at c-s.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130927/533de5a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_cs.png
Type: image/png
Size: 19066 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130927/533de5a1/attachment-0001.png>


More information about the Users mailing list