Hey Alexandre! Thanks a lot. So easy now!
Mark ________________________________ From: Alexandre Dubé <[email protected]> To: Mark Turek <[email protected]> Cc: [email protected] Sent: Friday, August 3, 2012 10:46 AM Subject: Re: [OpenLayers-Users] GeoJson serialize and ModifyFeautre Hey Mark, I got something. Instead of setting the vector layer features property directly, use the addFeatures() method to add new features : //vectors.features = geojson.read(serialized); vectors.addFeatures(geojson.read(serialized)); If you want to remove all current features first, call : vectors.removeAllFeatures(); HTH, Alexandre On 12-08-03 11:38 AM, Alexandre Dubé wrote: Hi Mark, > > Don't forget to include the list in CC so that others can see the progression of your issue. > >Regards, > >Alexandre > >On 12-08-03 11:25 AM, Mark Turek wrote: > >Hi Alexandre! >> >> >>Thank you for you answer. Attached you will find a little example program. >> >> >>Mark >> >> >> >>________________________________ >> From: Alexandre Dubé <[email protected]> >>To: [email protected] >>Sent: Friday, August 3, 2012 7:13 AM >>Subject: Re: [OpenLayers-Users] GeoJson serialize and ModifyFeautre >> >> >>Hi Mark, >> >> Could you provide a minimized test case showing the problem then ? Pasting some code would be nice but sharing a live demo would be even better. >> >> Here's a good "how to create a minimized test case" : http://docs.openlayers.org/help/minimize.html >> >>Regards, >> >>Alexandre >> >>On 12-08-02 10:28 PM, Mark Turek wrote: >> >>I am using 2.12 version. Here is the problem I have. >>>If I draw a polygon, selecting it with ModifyFeature works fine. If I >>>serialize the layer features and then read them back in through >>>deserialization ModifyFeature never selects anything and stops working. >>>Serialization/Deserialization is done through OpenLayers.Format.GeoJSON. >>> >>> >>>Any clue what is happening? >>> >>> >>>_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> >>-- Alexandre Dubé Mapgears www.mapgears.com >>_______________________________________________ >>Users mailing list >>[email protected] >>http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> >> > > >-- Alexandre Dubé Mapgears www.mapgears.com > > >_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Alexandre Dubé Mapgears www.mapgears.com
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
