GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 25
Registered: ‎06-17-2019

measureCaretMoved in ModifyAction.class vs. Snapping Event

[ Edited ]

Hello,

I have a Java Plugin which is listening on the measureCaretMoved event (com.intergraph.web.plugin.edit.actions.ModifyAction).

It works like a charm but when the user clicks next to an existing polygon line and the snapping feature is snapping the modified line/point to the existing polgyone line it seems that the actual snapping (means setting the coordinates) is done after the measureCaretMoved event.

Is my observation correct?

Do you know which event I should be listening to to get the correct coordinates when the snapping event has been triggered?

 

Thx & regards,

Bernhard

Contributor
Posts: 25
Registered: ‎06-17-2019

Re: measureCaretMoved in ModifyAction.class vs. Snapping Event

[ Edited ]

I have now tried to get my info from moveNode (measureVertex sounded promising) but still no luck:

 

    public void moveNode(GeometryCapture src, String actioncmd, MeasureVertex measureVertex, EditNodeAction[] actions) {
        GCoordinate coordinateToUse = measureVertex.coord;
        if (!Assertion.isValid(measureVertex.snap)) {
            coordinateToUse = new GCoordinate(coordinateToUse.getX(), coordinateToUse.getY(), 0.0D / 0.0);
        }

        this.processChange(ModifyAction.ModificationType.MOVE, coordinateToUse, actions);
    }

 

 

Maybe someone can give me a hint where the final snapping coordinate is stored?! :-)

 

Update 2019-08-12:

The moveNode method is working - but it only fires when the node has been actually moved.

 

I am still trying to find out which event is fired when the cursor has been moved and a line has been snapped to another line (by the snapping feature).

 

 

Any help would be greatly appreciated :-)

Bernhard

 

Contributor
Posts: 25
Registered: ‎06-17-2019

setSnapMarker

Found out that apparently the way to go is setSnapMarker in com.intergraph.web.viewer.measurement.