PlaceNode Click problem

classic Classic list List threaded Threaded
3 messages Options
cvxb cvxb
Reply | Threaded
Open this post in threaded view
|

PlaceNode Click problem

Hi all, i'm recently reinstalled osg and osgearth. I have a problem with click events for PlaceNode annotation.
I noticed that nothing happen when i click on the Annotation. The code it's the same, it still works for Annotations of CircleNode, EllipseNode,... type.
I'm using the old method of "AnnotationEventHandler" for catch up events, i know that it's deprecated, but RTTPicker::Callback also doesn't work.
The code it's very simples.

CircleNode* circle = new CircleNode(
            mapNode,
            GeoPoint(geoSRS, -90.25, 29.98, 1000., ALTMODE_RELATIVE),
            Distance(300, Units::KILOMETERS),
            circleStyle, Angle(-45.0, Units::DEGREES), Angle(45.0, Units::DEGREES), true);
        annoGroup->addChild( circle ); //it works

PlaceNode *place = new PlaceNode(mapNode, GeoPoint(geoSRS, -87.65, 41.90, 1000, ALTMODE_ABSOLUTE) , "POI", pm );
annoGroup->addChild( place );

I need to set/use something special?

Thanks in advance.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: PlaceNode Click problem

Roberto,

It is probably a better use of time to figure out why the RTTPicker callback isn't working for you.

Try running the example:

  osgearth_pick annotation.earth

There is a PlaceNode in there (labeled "Place") -- it should highlight when you roll the mouse over it.
Glenn Waldron / Pelican Mapping
cvxb cvxb
Reply | Threaded
Open this post in threaded view
|

Re: PlaceNode Click problem

Thanks