Just wanted to note that adding the wmc xmlns to each of the keys in
the string below fixes the problem.

Ehud.

On 6/8/07, Ehud Shabtai <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> On 6/8/07, Adair, Mike <[EMAIL PROTECTED]> wrote:
> > 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.
>
> I'm using a php code which creates a GML xml file. I want to add the
> GML layer to my map. So my new layer will have a URL pointing to the
> php file with the required parameters (may be changed by the user).
>
> I'm trying to use Sarissa to create an XML node from a string. For
> testing purposes here's what I'm doing:
>
> var doc = (new DOMParser()).parseFromString( '<Layer queryable="1"
> hidden="1" xmlns="http://www.opengis.net/context";
> xmlns:xlink="http://www.w3.org/1999/xlink";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.opengis.net/context
> http://schemas.opengeospatial.net/context/1.0.0/context.xsd";> <Server
> service="OGC:WMS" version="1.1.1" title="OGC:WMS"> <OnlineResource
> xlink:type="simple"
> xlink:href="/cgi-bin/mapserv.fcgi?map=/home/eshabtai/mapdata/israel_edit2.map&amp;"/>
> </Server> <Name>street_ranges2</Name> <Title>מספרי בתים2</Title>
> <SRS>EPSG:4326</SRS> <FormatList> <Format
> current="1">image/gif</Format> </FormatList> <StyleList> <Style
> current="1"> <Name>default</Name> <Title>default</Title> </Style>
> </StyleList> </Layer>', "text/xml");
>
> This does result in valid DOM object which represents the Layer node.
>
> But then when I call:
> config.objects.mainMap.setParam('addLayer', doc);
>
> I'm getting the following error:
> Node cannot be inserted at the specified point in the hierarchy" code: "3
>
> which results from the Context model trying to issue:
> parentNode.appendChild(layerNode.cloneNode(true));
>
> Any ideas?
>
> Thanks,
>
> --
> Ehud Shabtai
> http://www.freemap.co.il/map/
>


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

Reply via email to