Ehud, Where is your new layer information coming from? Right now we take layer info from a capabilities doc or a catalogue response and run an XSL on that to generate the chunk of XML to be added to the context doc. I think XSL is the best way to handle it for XML inputs, but if your source info is not in XML then you will need to come up with some other way.
Mike > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ehud Shabtai > Sent: Friday, June 08, 2007 09:03 > To: [email protected] > Subject: [Mapbuilder-devel] Adding a new layer to a context > > Hi, > > I need to dynamically add a layer to a context. I noticed > that each context model supports the addLayer method but it > expects to get an XML node describing the layer. > The new layer I'm trying to add is generated by a simple > javascript code, so I don't have an XML node. > > What would be the easiest way to implement it? Should I > create an xsl template and create the xml node using > parameters from the javascript code? My knowledge of xsl is a > bit lacking, so is there another way? I guess I can use > Sarissa and pass it a string which it could convert to an XML node? > > Thanks, > > -- > Ehud Shabtai > http://www.freemap.co.il/map/ > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > mapbuilder-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
