From: Alexandre A. S. <aas...@gm...> - 2011-08-31 10:21:44
|
Hi Florian, I've to do a kind of the same two months ago with the modificationfeature control instead of selectionfeature control. Indeed, in Js you have the method selectFeature, but in gwt you don't, so you have to call a native Js method using JSNI. Firstly create in your code a method like this: public static native void linkControlFeature(JSObject control, JSObject feature)/*-{ control.selectFeature(feature); }-*/; and where you want to select by code the feature make a call like: linkControlFeature(controlModifyFeature.getJSObject(), feature.getJSObject()); At least for me that works for modifycontrol, so I hope it helps to you. Cheers, Alex. ________________________________________ De: Florian Schaetz [Flo...@Op...] Enviado el: miércoles, 31 de agosto de 2011 11:40 Para: gwt...@li... Asunto: [Gwt-openlayers-users] Select in Vector Layer Hi, I've got a little problem here with Gwt-Openlayers, perhaps someone more clever than me has a good idea: Is there a possibility to select a VectorFeature in my Vector Layer (via code, not mouse clicking, obviously :-)? I know (read somewhere) that there is an (undocumented?) select method in the original JS OpenLayer code of SelectFeature, but the GWT OpenLayers Implementation only offers an unselect method in the SelectFeatureImpl class. I would need that method to synchronize the state of the vector layer with another widget. Would be great if anyone had a good idea on how to do that. Regards, Flo ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ |