[OpenLayers-Dev] GML Layers is no more visible in vector sandbox revision 2823

Christine Spietz spietz at fh-bingen.de
Wed Mar 21 03:49:59 EDT 2007


Hi Erik,

I have updated to the libraries of
http://svn.openlayers.org/trunk/openlayers revision 2828, but now it's 
working less then before.
I can not see any map anymore.
>----------------------------------->ERROR-MESSAGE>----------------------------------->
OpenLayers.MouseListener.MouseDefaults is not a constructor
var mouseListener = new OpenLayers.MouseListener.MouseDefaults();
in Map.js line 229.
>----------------------------------->END OF 
>ERROR-MESSAGE>----------------------------------->

The thing is: This line (mouseListener = ...) is not contained in Map.js of
the actual trunk-version of OpenLayers. So I thought I might have embedded
the wrong OpenLayers-folder in my page, but this is also not the case.

Do you have an idea, what may have gone wrong? Is it a bug in the actual
trunk version or what else coul be the cause?

Some code snippets:
>----------------------------------->CODE>----------------------------------->
<script src="lib/OpenLayers.js" />

map = new OpenLayers.Map($('map'), {projection: "EPSG:31467",maxExtent: 
maxEBBOX,maxResolution: "auto",units: 'meters'});

var freedop_baselayer = new 
OpenLayers.Layer.WMS.Untiled("FreeDOP","http://geo.service24.rlp.de/wmsconnector/com.esri.wms.Esrimap/RLP_FREEDOP?",{layers:"dop",format:"image/png",bgcolor:"0xffffff",transparent:"true"},
{isBaseLayer:true});
map.addLayers([freedop_baselayer]);
...
map.addControl(new OpenLayers.Control.LayerSwitcher());
...
var schlaege = new OpenLayers.Layer.GML("Schlaege",url,{style: new 
OpenLayers.Style({strokeColor: "rgb(128,0,255)",strokeWidth: 
3,strokeOpacity: 0.5,fillColor: "rgb(100,100,255)",fillOpacity: 
0.1,hoverStrokeColor: "red"})});
map.addLayer(schlaege);
map.zoomToMaxExtent();
>----------------------------------->END OF 
>CODE>----------------------------------->

Christine



----- Original Message ----- 
From: "Erik Uzureau" <erik.uzureau at metacarta.com>
To: "Christine Spietz" <spietz at fh-bingen.de>
Cc: <dev at openlayers.org>
Sent: Tuesday, March 20, 2007 4:31 PM
Subject: Re: [OpenLayers-Dev] GML Layers is no more visible in vector
sandbox revision 2823


> Christine,
> You should update your libraries to the actual version on
> http://svn.openlayers.org/trunk/openlayers
>
> We have merged the vector code into trunk last week :-)
> Erik
>
> On 3/20/07, Christine Spietz <spietz at fh-bingen.de> wrote:
>> Hi,
>>
>> I updated my OpenLayers libraries to the actual version on
>> http://svn.openlayers.org/sandbox/vector/. Now my GML-layers (working in
>> previous versions) do not work any more.
>>
>> I set a variable url with the WFS-request of my WFS which provides a
>> FeatureCollection and createt my GML-layer:
>>
>> >----------------------------------->CODE>----------------------------------->
>> var myGMLLayer= new OpenLayers.Layer.GML("myGMLLayer",url,
>> {style: new OpenLayers.Style({
>>     strokeColor: "rgb(128,0,255)",
>>     strokeWidth: 3,
>>     strokeOpacity: 0.5,
>>     fillColor: "rgb(100,100,255)",
>>     fillOpacity: 0.1,
>>     hoverStrokeColor: "red"
>> })}
>> );
>>
>> map.addLayer(myGMLLayer);
>> >----------------------------------->END OF
>> >CODE>----------------------------------->
>>
>> This worked in previos versions of OpenLayers vector-sandbox-lib.
>>
>> The GML-examples I found on
>> - http://dev.openlayers.org/sandbox/vector/examples/ GML.html and
>> GMLTasmania.html seem also not to work. They also use the same procedure,
>> for example generating a GML-layer with
>> >----------------------------------->CODE>----------------------------------->
>> l1 = new OpenLayers.Layer.GML("Tasmania
>> Cities","tasmania/TasmaniaCities.xml", {style: new
>> OpenLayers.Style({strokeColor: "green"})});
>> >----------------------------------->END OF
>> >CODE>----------------------------------->
>>
>> Can anybody tell me how to handle GML-Layers/ make them visible again.
>>
>> Thank you for help!!!!
>>
>>
>> Christine
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>




More information about the Dev mailing list