On Thu, Mar 17, 2011 at 4:25 PM, Alexandre Dube <[email protected]> wrote: > Hi, > > I'm not sure if this is the right place to raise this, nor if there's > a clean solution for it, not if someone already noticed that... but here > goes. > > Since a few weeks ago, the OpenLayers.Control.DrawFeature control has > a Point feature following the mouse around while drawing. Looking at > the vector layer the handler uses, I noticed that while moving the mouse > around without drawing anything with Path or Polygon handler, you have 2 > features in it : a Point and a broken LineString or Polygon (containing > only one Point component). > > When using the GeoExt print widgets, that temp vector layer of the > Handler is also taken for print and results in MapFish print server > complaining about the invalid geometry.
I guess you would have had the same issue with the old drawing code if you attempted to print while in the middle of drawing. It is just that with the new code makes the situation more likely. > A simple a quick workaround > would be to check at the name of the vector layer and simply skip any > "OpenLayers.Handler...". But, as usual, I wonder if there's something > better I could do... Like maybe the GeoExt.data.PrintProvider could > validate that the features have valid geometries before returning a > Vector layer spec... Right now we don't have a way to check that geometries are valid, do we? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Dev mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/dev
