<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    First, I'm new on this list, maybe I will use it not really
    correctly.<br>
    <br>
    I will probably ask for already answered questions. <br>
    <br>
    <br>
    <br>
    Now my purpose.<br>
    <br>
    I try to use in a production context Web Map Context.<br>
    The goal is to persist a user's wmc context in its "preference" in
    DB.<br>
    <br>
    I started  form the wmc.html exemple ( OpenLayers-2.12))<br>
    <br>
    <br>
    I add 4 layers : <br>
    a google one<br>
    a osm one<br>
    two WMS "classics'<br>
    <br>
    When I write the WMC only the two WMS ar in the final xml<br>
    <br>
    It seems correct regarding to the lib  :  WMC.js around line 170<br>
    <br>
    <span class="sourceRowText" role="presentation">  for (var i=0,
      len=layers.length; i<len; i++) {
    </span>
    <div executable="true" id="sb156-L171" class="sourceRow"
      role="presentation"><span class="sourceRowText"
        role="presentation">       var layer = layers[i];
      </span></div>
    <div exe_line="true" breakpoint="true" executable="true"
      id="sb156-L172" class="sourceRow" role="presentation"><span
        class="sourceRowText" role="presentation">           if (layer
        instanceof OpenLayers.Layer.WMS) {
      </span></div>
    <div breakpoint="true" executable="true" id="sb156-L173"
      class="sourceRow" role="presentation"><span class="sourceRowText"
        role="presentation">         
        context.layersContext.push(this.layerToContext(layer));
      </span></div>
    <div id="sb156-L174" class="sourceRow" role="presentation"><span
        class="sourceRowText" role="presentation">    }
      </span></div>
    <div id="sb156-L175" class="sourceRow" role="presentation"><span
        class="sourceRowText" role="presentation">   }
      </span></div>
    <br>
    <br>
    here are tests for my layers : <br>
    <span class=" ">layer instanceof OpenLayers.Layer.OSM  </span><span
      role="presentation" class="objectBox objectBox-number ">true</span>  
    -> not in wmc <br>
    <span class=" ">layer instanceof OpenLayers.Layer.Google </span><span
      role="presentation" class="objectBox objectBox-number ">true</span>
    -> not in wmc<br>
    <br>
    <span class=" ">layer instanceof OpenLayers.Layer.WMS  </span><span
      role="presentation" class="objectBox objectBox-number ">true</span>
    -> in wmc<br>
    <br>
    Please how I can solve that  ? <br>
    <br>
    thank you.<br>
    <br>
    <br>
    <br>
    PS : in on line wmc sample a google layer is written in wmc ... ?
    other version  ?<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td><a href="www.c-s.fr" hreflang="fr"><img
                  src="cid:part1.08080607.03070506@c-s.fr" alt=""
                  align="left" border="0"></a> </td>
            <td><font size="1" face="verdana">
                <b>Bernard Grosdoy</b><br>
                Ingénieur d'études et développements<br>
                <a
                  href="https://thor.si.c-s.fr/blogs/cs-blogs-business/">
                  <b>Business Unit E-SPACE & Geo Information</b></a><b>
                  - Département APPLICATIONS</b><br>
                Cellule Eau, Environnement, Risques<br>
                <br>
                <b>CS Systèmes d'Information</b><br>
                Parc de la Grande Plaine - 5, Rue Brindejonc des
                Moulinais - BP 15872<br>
                31506 Toulouse Cedex 05 - FRANCE<br>
                Tel : +33 561 39 46 46 / Std : +33 561 17 66 66 / Fax :
                +33 561 34 84 15 <br>
                Email : <a class="moz-txt-link-freetext"
                  href="mailto:bernard.grosdoy@c-s.fr">bernard.grosdoy@c-s.fr</a>
              </font></td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>