[OpenLayers-Users] How to have multiple wms layers into one Openlayers.WMS layer

2010-01-18 Thread David Alda Fernandez de Lezea
Hello, I'm trying to have an Openlayers.WMS layer that should contain 2 WMS layers, served by MapServer, using the following code (in theory this is possible): var twms = new OpenLayers.Layer.WMS( Sigpac, http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map;, {

Re: [OpenLayers-Users] How to have multiple wms layers into one Openlayers.WMS layer

2010-01-18 Thread Marco Scheuble
Hi David, For me it works when I do it like this: map.addLayer( new OpenLayers.Layer.WMS( Niedersachsen WMS, http://www.geobasisdaten.niedersachsen.de/bestand;, {layers: 'ueb5000_nf,ueb1000_nf,ukn500_nf,dtk100_v_nf'}, {singleTile:true} ) ); cheers, Marco Am 18.01.2010

[OpenLayers-Users] Center fo a line geometry? click event...

2010-01-18 Thread paweluz
Hi I have a problem with openlayers. I Have a roads on my map that are serve by WFS. I used function onFeatureSelect(feature) to get to the attributes of this geometry. I show them in a popup menu. The problem is shown on the screen below. http://zapodaj.net/1574e8d9d73c.jpg.html The blue

[OpenLayers-Users] SelectFeature on Overlapping Layers

2010-01-18 Thread afrozk
Hi, I have two vector layers Layer1 and Layer2 on a country base map. I use the following code to fetch data for the layers. var selectControl = new OpenLayers.Control.SelectFeature( [Layer1, Layer2], {

Re: [OpenLayers-Users] How to have multiple wms layers into one Openlayers.WMS layer

2010-01-18 Thread David Alda Fernandez de Lezea
Thanks to both of you. The problem was the blank space as you mentioned Pierre. Thanks again. Un saludo, ·· David Alda Fernández de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y

Re: [OpenLayers-Users] How to have multiple wms layers into one Openlayers.WMS layer

2010-01-18 Thread Andreas Hocevar
David Alda Fernandez de Lezea wrote: Hello, I'm trying to have an Openlayers.WMS layer that should contain 2 WMS layers, served by MapServer, using the following code (in theory this is possible): var twms = new OpenLayers.Layer.WMS( Sigpac,

Re: [OpenLayers-Users] Center fo a line geometry? click event...

2010-01-18 Thread Marc Jansen
Hi Poul, it should be possible to position the popup at the clicked coordinate via: // evt is the argument passed over to the trigger-function lonlat = map.getLonLatFromViewPortPx(evt.xy); // use the above lonlat object to position the popup: popup = new OpenLayers.Popup.FramedCloud( chicken,

Re: [OpenLayers-Users] SelectFeature on Overlapping Layers

2010-01-18 Thread Marc Jansen
Hi Afroz, maybe the Vector.RootContainer-Layer is of any help to your problem: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer/Vector/RootContainer-js.html Regards, Marc afrozk wrote: Hi, I have two vector layers Layer1 and Layer2 on a country base

[OpenLayers-Users] Zoom on GML extent

2010-01-18 Thread christophe triquet
Hi, I'm adding a GML file in my map with the object OpenLayers.Layer.GML. I'm trying to zoom to this layer extent at map's loading. I can do this if I know de bounding box coordinates with a postgis query. My PHP code : var bounds = new OpenLayers.Bounds(); bounds.extend((new

Re: [OpenLayers-Users] Center fo a line geometry? click event...

2010-01-18 Thread paweluz
Hi Marc Thanks for your reply. But unfortunately it does not work. I was aware of method getLonLatFromViewPortPx(evt.xy) on map. but I could not make it work. I used this code: var lonlat; Map.events.register(click, Map, function(e) { lonlat =

Re: [OpenLayers-Users] Zoom on GML extent

2010-01-18 Thread Andreas Hocevar
christophe triquet wrote: Hi, I'm adding a GML file in my map with the object OpenLayers.Layer.GML. I'm trying to zoom to this layer extent at map's loading. I can do this if I know de bounding box coordinates with a postgis query. Is it possible the get the gml extent to be able to

[OpenLayers-Users] WFS attributes at init()

2010-01-18 Thread paweluz
Hi! I am able to get name of the attribute and the attribute by clicking on the feature on map. I am trying to get only the name of the feature, and use them in init(function), not only in method onFeatureSelect(feature) but also in init(). Is there a way to get to them by using just the

Re: [OpenLayers-Users] ModifyFeature force selection, can't unselect

2010-01-18 Thread Alexandre Dube
Eric, (I should have looked there first). Thanks, Alexandre Eric Lemoine wrote: On Fri, Jan 15, 2010 at 5:31 PM, Alexandre Dube ad...@mapgears.com wrote: Hi, I noticed something odd when using a ModifyFeature control. If you force the selection of a feature with

Re: [OpenLayers-Users] SelectFeature on Overlapping Layers

2010-01-18 Thread Christopher Schmidt
On Mon, Jan 18, 2010 at 01:00:31PM +0100, Marc Jansen wrote: Hi Afroz, maybe the Vector.RootContainer-Layer is of any help to your problem: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer/Vector/RootContainer-js.html No, he's already using that implictly

Re: [OpenLayers-Users] Zoom on GML extent

2010-01-18 Thread Christopher Schmidt
On Mon, Jan 18, 2010 at 01:32:24PM +0100, christophe triquet wrote: Hi, I'm adding a GML file in my map with the object OpenLayers.Layer.GML. I'm trying to zoom to this layer extent at map's loading. I can do this if I know de bounding box coordinates with a postgis query. My PHP code :

Re: [OpenLayers-Users] WFS attributes at init()

2010-01-18 Thread Arnd Wippermann
Hi, Do you mean something like this?: var WFSLayer = ...; WFSLayer.events.on({ loadend: function() { var ftAttributes = WFSLayer.features[0].attributes; var Msg=; for(var key in ftAttributes) Msg += key + : + ftAttributes[key] + \r\n; alert(Msg);

[OpenLayers-Users] [net...@aliceadsl.fr: Re: Zoom on GML extent]

2010-01-18 Thread Christopher Schmidt
- Forwarded message from christophe triquet net...@aliceadsl.fr - From: christophe triquet net...@aliceadsl.fr To: Christopher Schmidt crschm...@metacarta.com Date: Mon, 18 Jan 2010 22:54:46 +0100 Subject: Re: [OpenLayers-Users] Zoom on GML extent 2010/1/18 Christopher Schmidt

Re: [OpenLayers-Users] How to have multiple wms layers into one Openlayers.WMS layer

2010-01-18 Thread Eric Lemoine
On Monday, January 18, 2010, David Alda Fernandez de Lezea da...@ikt.es wrote: Hello, I'm trying to have an Openlayers.WMS layer that should contain 2 WMS layers, served by MapServer, using the following code (in theory this is possible): var twms = new OpenLayers.Layer.WMS( Sigpac,

Re: [OpenLayers-Users] SelectFeature on Overlapping Layers

2010-01-18 Thread afrozk
Thanx for the replies, What I expect is to get the data for the polygon on Layer2 hidden below the polygon on Layer1. I donno how to iterate and check if theres an intersection and get data if thers an intersection. Did some research on this before replying but failed. Please shed