Hi, Jean Pommier (IGE) wrote: > I'm working over the mergeModels example. But in my case, i've got > some GML lines that overlay on some areas. Mainly, it's not a problem. > But one of the lines is an exact sub-part of another, bigger, one. And > when i hover the line, sometimes the small one is highlighted, > sometimes (most of the times), it's the biggest one. But i'd like to > get a list of the objects selected at this time, ie the 2 lines. > Is there any easy means, or shall i digg in the javascript code ?
The reason is that hovering/selecting vector features relys on SVG/VML events. It is unpredictable which SVG/VML node will receive the event first. This is a known limitation of OpenLayers (http://trac.openlayers.org/ticket/434). If your GML data is backed by a WFS, yo can use the GetFeatureInfoWSR widget and WebServiceRequest tool to do a query on click. This will return you a FeatureCollection of the features that are in the area of your click. If your GML is purely client side, you have to use the geometry intersection functions of OpenLayers in a custom widget. The former is the easier way, and you can do that without JS coding. Regards, Andreas. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mapbuilder-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
