From: David R R. <drr...@op...> - 2010-09-23 15:38:07
|
In JavaScript I do it as follows: this.popup = new OpenLayers.Popup.FramedCloud( "select_projects_popup", this.map.getLonLatFromPixel(event.xy), new OpenLayers.Size(250, 100), event.text, null, true ); It would be nice if we can get property "xy" from the event. On 9/23/2010 11:04 AM, Lukas Johansson wrote: > Basicly if you request the data as html I guess that you will have to parse the html to get the latlon for each feature. You will not have features as illustrated in my example. > /Lukas > > -----Ursprungligt meddelande----- > Från: David R Robison [mailto:drr...@op...] > Skickat: den 23 september 2010 16:28 > Till: gwt...@li... > Ämne: Re: [Gwt-openlayers-users] WMSGetFeatureInfo and AnchoredBubble > > Also, if I get the data back as HTML will I still have a collection of > features from which I can get the LonLat? Thanks, David > > On 9/23/2010 10:06 AM, David R Robison wrote: >> Also I don't see >> >> .setLayers(arrayOfLayersToQuery)) >> >> in the latest code. David >> >> >> On 9/23/2010 9:58 AM, Lukas Johansson wrote: >>> Basicly like this, (copy pasted from our working code, but you get the idea). >>> >>> WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); >>> options.setLayers(arrayOfLayersToQuery)); >>> options.setDrillDown(true); >>> options.setQueryVisible(true); >>> options.setInfoFormat("application/vnd.ogc.gml"); //return result as gml >>> >>> >>> public void onGetFeatureInfo(GetFeatureInfoEvent eventObject) { >>> VectorFeature[] features = eventObject.getFeatures(); >>> String html = "foo"; >>> FrameCloud popup = new FramedCloud("MapFeaturePopup", features[0].getCenterLonLat(), new Size(300, 400), html); >>> } >>> >>> /Lukas >>> >>> >>> >>> -----Ursprungligt meddelande----- >>> Från: David R Robison [mailto:drr...@op...] >>> Skickat: den 23 september 2010 15:41 >>> Till: gwt...@li... >>> Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo and AnchoredBubble >>> >>> I am using the latest gwt-openlayers source. I an usingthe >>> WMSGetFeatureInfo control. In the onGetFeatureInfo event listener I am >>> trying to create and AnchoredBubble to display the results of the >>> WMSGetFeatureInfo. How do I get the LonLat from the GetFeatureInfoEvent >>> to pass to the AnchoredBubble constructor? Also it would be nice to be >>> able to set the layers to query in the WMSGetFeatureInfoOptions. David >>> -- David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drr...@op... web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately. |