From: Cerávolo, R. V.B. <raf...@gm...> - 2010-01-15 16:30:05
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hi Lukas,<br> <br> This issue happens on version 0.4 but was already fixed in the current source code (mercurial repository).<br> <br> You can get the last source code from the mercurial repository: <code><a class="moz-txt-link-freetext" href="http://gwt-openlayers.hg.sourceforge.net:8000/hgroot/gwt-openlayers/gwt-openlayers">http://gwt-openlayers.hg.sourceforge.net:8000/hgroot/gwt-openlayers/gwt-openlayers</a></code>.<br> <br> Regards,<br> Cerávolo<br> <br> On 15/01/2010 11:41, Lukas Johansson wrote: <blockquote cite="mid:A76...@ex..." type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="Generator" content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.E-postmall17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} .MsoChpDefault {mso-style-type:export-only;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> <div class="Section1"> <p class="MsoNormal"><span lang="EN-US">Hello, I’m trying to use SelectFeature in gwt-openlayers 0.4:<o:p></o:p></span></p> <p class="MsoNormal">Layer layer = new Vector();<o:p></o:p></p> <p class="MsoNormal"><span lang="EN-US">Control cntrl = new SelectFeature(layer);<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">SelectFeatureOptions options = new SelectFeatureOptions();<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">options.onSelect(new SelectFeatureListener() { <o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> public void onFeatureSelected(VectorFeature vectorFeature) {<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> Window.alert("feature selected");<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">});<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">options.onUnSelect(new UnselectFeatureListener() {<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> public void onFeatureUnselected(JSObject vectorFeature) {<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> Window.alert("feature unselected");<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">});<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">map.addControl(cntrl);<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">But when the code is executed I get the following error:<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">14:52:51.378 [WARN] [Standard] Member 'onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/feature/VectorFeature;)' in JSNI reference '@org.gwtopenmaps.openlayers.client.control.SelectFeature.UnselectFeatureListener::onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/feature/VectorFeature;)' could not be found; expect subsequent failures<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">java.lang.NoSuchFieldError: onFeatureUnselected(Lorg/gwtopenmaps/openlayers/client/feature/VectorFeature;)<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">I’ve noticed that the onFeatureUnselected receives a JSObject while the onFeatureSelected receives a VectorFeature which seams a bit odd. <o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">Any help would be appreciated.<o:p></o:p></span></p> </div> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/rsaconf-dev2dev">http://p.sf.net/sfu/rsaconf-dev2dev</a></pre> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> _______________________________________________ Gwt-openlayers-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Gwt...@li...">Gwt...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users">https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users</a> </pre> </blockquote> <br> </body> </html> |