<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2>Dear Adorian,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2>This is the code I have to activate a modifyFeature on a
geojson layer. I have a lot of those, so I activate it on a layer by
name:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765012411-04122008><FONT face=Arial
color=#0000ff size=2> modifyControl = new
OpenLayers.Control.ModifyFeature(map.getLayersByName(stateNames[modifyControlIndex])[0]);<BR>
map.addControl(modifyControl);<BR>
modifyControl.activate();</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=765012411-04122008></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>H<SPAN class=765012411-04122008>ope this
helps.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=765012411-04122008></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=765012411-04122008>Kind regards,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=765012411-04122008></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=765012411-04122008>Jan</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=765012411-04122008></SPAN></FONT></FONT></FONT> </DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Adorian Ardelean
[mailto:mynature@gmail.com] <BR><B>Sent:</B> Thursday, December 04, 2008
10:17<BR><B>To:</B> j.vanderven@magion.nl<BR><B>Cc:</B>
users@openlayers.org<BR><B>Subject:</B> Re: [OpenLayers-Users] GeoJSON layer and
modifyFeature control<BR></FONT><BR></DIV>
<DIV></DIV>Hi Jan,<BR><BR>In test case, it does not work even if I have only one
layer and one modifyFeature control (no other selectFeature and modifyFeature
controls). <BR><BR>In real application case, I switch (one-at-a-time)
among controls using an external form and multiple selection controls work on
the two distinct layers (let say I have several selectFeature controls to get
feature infos in various layers). Only the modifyFeature on the GeoJSON layer
does not work.<BR><BR>All the best,<BR>Adorian<BR><BR><BR>
<DIV class=gmail_quote>On Thu, Dec 4, 2008 at 9:54 AM, Jan van der Ven <SPAN
dir=ltr><<A
href="mailto:j.vanderven@magion.nl">j.vanderven@magion.nl</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>Only one
select control can be active at the same time. Selections are made in the
layer that is on top of the Z-order.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>Kind
regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN>Jan</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV><FONT face=Arial color=#0000ff
size=2></FONT><BR>
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A> [mailto:<A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A>] <B>On Behalf Of </B>Adorian
Ardelean<BR><B>Sent:</B> Thursday, December 04, 2008 09:47<BR><B>To:</B> <A
href="mailto:users@openlayers.org"
target=_blank>users@openlayers.org</A><BR><B>Subject:</B> [OpenLayers-Users]
GeoJSON layer and modifyFeature control<BR></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV></DIV>Hi,<BR><BR>I have a very simple question: is it possible to modify
features in a layer populated from a GeoJSON file? I am asking just about
modifying feature on map without the saving part.<BR>I did add the
modifyFeature control, but I cannot select and modify any of the polygons in
this layer ( var regions = new
OpenLayers.Layer.Vector("regions",{extractAttributes:true, format:
OpenLayers.Format.GeoJSON, projection: new OpenLayers.Projection("EPSG:4326"),
styleMap: new OpenLayers.StyleMap(mystyle)});)<BR>Another modifyFeature
control works OK on a second vector layer (var vectors = new
OpenLayers.Layer.Vector("vectors");). <BR><BR>All the
best,<BR>Adorian<BR><BR>-- <BR>Dr. Adorian Ardelean<BR>coordinator of myNature
Project<BR><BR><A
href="http://mybiosis.info/nature/portal.php?pagename=firstpage"
target=_blank>http://mybiosis.info/nature/portal.php?pagename=firstpage</A> [a
Romanian biodiversity-database]<BR><A
href="http://mybiosis.info/nature/portal.php?pagename=adorian"
target=_blank>http://mybiosis.info/nature/portal.php?pagename=adorian</A>
[CV]<BR></DIV></DIV>
<P><FONT face=Arial size=2>No virus found in this incoming message.<BR>Checked
by AVG - <A href="http://www.avg.com"
target=_blank>http://www.avg.com</A><BR>Version: 8.0.176 / Virus Database:
270.9.12/1824 - Release Date: 2-12-2008 9:31<BR></FONT></P>
<P><FONT face=Arial
size=2></FONT></P></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A
href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR><A
href="http://openlayers.org/mailman/listinfo/users"
target=_blank>http://openlayers.org/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Dr. Adorian Ardelean<BR>coordinator of myNature
Project<BR><BR><A
href="http://mybiosis.info/nature/portal.php?pagename=firstpage">http://mybiosis.info/nature/portal.php?pagename=firstpage</A>
[a Romanian biodiversity-database]<BR><A
href="http://mybiosis.info/nature/portal.php?pagename=adorian">http://mybiosis.info/nature/portal.php?pagename=adorian</A>
[CV]<BR><BR>
<P><FONT face=Arial size=2>No virus found in this incoming message.<BR>Checked
by AVG - http://www.avg.com<BR>Version: 8.0.176 / Virus Database: 270.9.12/1824
- Release Date: 2-12-2008 9:31<BR></FONT></P></BODY></HTML>