[OpenLayers-Users] Modify object other then from muse click

paweluz paweluz at o2.pl
Mon Feb 8 09:06:19 EST 2010


Hi!

Thanks for your help but unfortunately it does not work. Here is my code:

My controlls

            drawControls = {
                chooseobject: new OpenLayers.Control.SelectFeature(
					zielona_wfs,
					{
						onSelect: onFeatureSelect	
					}
				),
				modify_wfs_layer: new OpenLayers.Control.ModifyFeature(zielona_wfs)
         			....	
                               };

Getting the feature

        function onFeatureSelect(feature) {
                        ....
			selectedfeature = feature;
                        ...
                        }

Checkbox Onclick method

                function edit_object()
		{
			if (document.getElementById('checkbox_editable').checked==true)
			{	

				.....				
				for(var i=0; i<selectedfeature.length; i++) 
				{
					alert("Watch out!!!");
					drawControls["chooseobject"].unselect(selectedfeature[i]);
				
drawControls["modify_wfs_layer"].selectControl.select(selectedfeature[i]);
				}			
				drawControls["modify_wfs_layer"].activate();				
				....
			}
               }

The alert does not appear even once! I checked in firebug that
selectedfeature is not empty. This is a screen from firebug

http://i47.tinypic.com/2dwarzr.jpg

I am not sure about the length property?? What do you thing. Maybe I made so
mistake?? 

Cheers,
Poul

-- 
View this message in context: http://n2.nabble.com/Modify-object-other-then-from-muse-click-tp4504224p4534285.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list