[OpenLayers-Users] LayerSwitcher and DragFeature patched for ticket #1666?

dalsinao dalsinao at yahoo.es
Wed Feb 11 07:54:17 EST 2009


I use IE, but the same happens in FireFox.

Yes, using OpenLayers.Layer.Vector seems to work fine with the
LayerSwitcher, I've checked with your example and my patched code and it
works. The problem comes when I try to use a OpenLayers.Layer.WFS layer
(vector-based as well), then I have the problem I described in the previous
message. 

Below I put the way I create the WFS layer code, adapting the one in
select-feature-multilayer to create a WFS layer in stead (I've removed the
ogc:Filter, which is a bit long). May be you spot some Issue in this: 

    var vectors1 = new OpenLayers.Layer.WFS(
	"Storyline_1_Injections",
	"http://localhost/JEMM30/wfs/wfs.aspx?",
	{VERSION: "1.1.0",FILTER: "<ogc:Filter ...>...</ogc:Filter>",TYPENAME:
"Injection"},
	{
	    typename: "WFSInjection",
				styleMap: new OpenLayers.StyleMap({
					"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
						externalGraphic: "../img/marker-green.png",
						graphicOpacity: 1,
						rotation: -45,
						pointRadius: 10
					}, OpenLayers.Feature.Vector.style["default"])),
					"select": new OpenLayers.Style({
						externalGraphic: "../img/marker-blue.png"
					})
				}),
	    extractAttributes: true,
	    format: OpenLayers.Format.GML.v3,
            formatOptions: {
                featureType: "FeatureContainer",
		featureNS: "http://mynamespace/cax",
		geometryName: "Injection"
            }

	}
    );

Any idea on why it happens using a WFS layer and not using directly a Vector
layer?

Thanks for your help!
David


Christopher Schmidt-2 wrote:
> 
> On Wed, Feb 11, 2009 at 01:17:16AM -0800, dalsinao wrote:
>> 
>> Hi users and any developer around,
>> 
>> I downloaded and applied the patch singleroot.4.patch attached to this
>> ticket #1666.
>> It works fine using SelectFeature control, but then the LayerSwitcher
>> control doesn't. When you switch off any of the WFS layers in the
>> switcher
>> control the features don't disappear from the map; they remain on the
>> same
>> location on the map viewport, even if you zoom or pan.
> 
> What browser? I don't get this behavior on 
> 
>  
> http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html
> 
>> - Sooner more than later I'll have to use the DragFeature (or
>> ModifyFeature)
>> control; I guess they'll have to be patched as well to work correctly
>> with
>> this "one single, mother of all vector layers". Again, any idea of
>> when/if
>> it's going to happen?
> 
> Whenever you sit down and do the work, or someone else feels
> sufficiently motivated to do the same. 
> 
>> - Finally, I understand that all this is should be ready for 2.8,
>> correct?
>> Any idea of around when is it expected to release this version?
> 
> Probably not. I'm hoping that the SelectFeature changes make it into
> 2.8, but I doubt that drag/modify feature stuff will make it in as well
> without effort that hasn't yet been offered.
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/LayerSwitcher-and-DragFeature-patched-for-ticket--1666--tp2307581p2308434.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list