From: Mikael C. <mik...@cl...> - 2010-03-04 16:00:43
|
Hi Josafat (and others), Thanks for taking time to answer. And I'm happy I'm not the only one having problems with this ! Anyway, I hope what follows will help you. I have been pushing my research on GML parsing in OL, and I finally managed to parse with GML.v3. It wasn't so hard, it's just that I'm not very good in JS and I always need an example to make anything work. That done, it was easy to implement that into GWT-OL's GML3. I'll have to do a bit of refactoring and documenting before I can push anything to the repository. As for the other problem, the communication with the WFS server and the way to query it, I'd still love to get any information you could provide me. Regards, Mikael 2010/3/3 Josafat Guerrero <jos...@gm...> > Hi everyone, > > I have also been working on a OL-GWT project with almost the same > requirements as yours. > First, I would like to state something about this problem > > - gwt-openlayers api is mostly a wrapper for OL (as far as I know) > - Thera are some classes without implementation, as GML for the read method > - Certainly, is really complicated to do some work, because some of the > documentation for GWT-OL api is not done or unfinished > > > From my experience, It is necessary to create some utility classes to > acomplish the work you are trying to do. > Indeed, I am also trying to solve the same problem at this precise moment, > and I agree with you, most of the ideas behind OL are more 'layer' oriented > than feature oriented. > > Choosing GML as a representation its possible because it it already > serializable, so you can trasfer without great complications, but there is a > lack for GML parser on the client side(with GWT). > > Maybe we have to look directly at the OL documentation to accomplish this > problem and write the proper interface. > > Best Regards > > > El mar 3, 2010, a las 12:25 p.m., Mikael Couzic escribió: > > Hi all, > > > I'll be working on a project involving GWT-OL in the following weeks, and I > could use a little advice on how I am going to proceed. > > To be quick, I'll be displaying regions on a map, and the color of each > region will be dynamically calculated on the fly based on GWT server-side > values. To complicate things up, some regions will be groups of regions, > also defined on the GWT server. > My first idea was to set up a GeoServer and fetch the features with WFS > GetFeature requests. From there I could display the features with whatever > style I wanted, and I could even make groups using > OpenLayers.Geometry.Collection<http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Collection-js.html#OpenLayers.Geometry.Collection.OpenLayers.Geometry.Collection> > .calculateBounds<http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Geometry/Collection-js.html#OpenLayers.Geometry.Collection.calculateBounds>(or so I hope I could). > > But then I couldn't find a simple way to get features (and not layers) from > WFS, and I could'nt even manage to parse my GML with the corresponding GML3 > class. I'm feeling a bit helpless... > > The way I see it now, if I stay stuck, here's what I'll have to do : > Fetch the features with com.google.gwt.http.client<http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/package-frame.html> > Parse the GML with com.google.gwt.xml.client<http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/xml/client/package-frame.html> > And from that extract the posList, then generate the points, from that > instantiate the LinearRings and then I'll have my features. I feel like I > might be reinventing the wheel somewhere. > > Just to give you the idea, my dream object would be like : > List<VectorFeature> features = *MyDreamObject* > .getFeaturesFromRemoteGML(WFS_URL);* > * > Has anyone ever tried something similar ? > Do you know anything that could help me ? > Any help would be MOST appreciated. > > Thanks ! > > > -- > Mikael > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev_______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > > ************************************************ > L. en C.C. Josafat Isaí Guerrero Iñiguez > UNidad de Informatica Geoespacial > Instituto de Geografía > Universidad Nacional Autónoma de México > > jo...@ci... > jos...@gm... > > ************************************************ > > > > |