From: Lukas J. <luk...@de...> - 2010-11-24 15:35:23
|
You want the x/y of the mouseclick in order to construct a WMSGetFeautureInfo? Why not use the existing WMSGetFeatureInfo control to begin with? This will handle the events, the request to the server and you can get it to produce a parsable result in GML from witch you can create features. Or have I misunderstood your usecase? /Lukas Från: Jon Britton [mailto:jon...@go...] Skickat: den 24 november 2010 15:20 Till: gwt-openlayers-users Ämne: [Gwt-openlayers-users] MapClickListener support Hi I'm trying to register a MapClickListener so that I can generate a GetFeatureInfo request using the mouse x and y coordinates. Here is what I've got so far: mw.getMap().getListeners().add(new MapClickListener() { @Override public void onClick(MapClickEvent e) { SC.say("Map click at " + e.getLonLat()); } }); However, getListeners() isn't supported as far as I can tell (I get an UnsupportedOperationException on the first line above). Are there any plans to implement this soon? Alternatively, is there any other way to access the map coordinates of the mouse cursor? Thanks, Jon |