Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Super Contributor
Posts: 301
Registered: ‎02-10-2016

GMSC 2016 Java API Spatial Analysis function shows unnecessary crosses

Hi all,

 

We are migrating client GMSC from 2014 to 2016, including all java plugins. We have a java plugin that allows us to mouse-click on the map, then sets the top layer feauture active, get the instance of that feature at the clicked point and launches its workflow directly. 

 

The java plugin makes use of the Java API: SpatialAnalysis object to get the top layer and instance value of the clicked point. 

 

Image 1.png

 

In GMS C2014, when we do mouse move on the map, it does not show many crosses.

Image 1.png

 

However, on GMSC 2016, it shows a lot of crosses and even coordinate values which not desirable and makes end-users not sure where to click.

 

Image 2.png

 

I just wonder whether there are ways that I can turn these crosses/utility functions off (programmatically), so the map looks less crowded  and similar to the one in 2014 

 

Appreciate all suggestions and ideas

 

Kind regard

 

Technical Evangelist
Posts: 148
Registered: ‎10-20-2015

Re: GMSC 2016 Java API Spatial Analysis function shows unnecessary crosses

Hi Bob,

which snapping modes were active at both screenshots?

 

You can use the SmartSnapHandler to manipulate the active SmartSnapMode's:

SmartSnapHandler smartSnapHandler = context.getMap().getMeasurementController().getSmartSnapHandler();

List<SmartSnapMode> activeSmartSnapModes = context.getMap().getMeasurementController().getSmartSnapHandler().getActiveSmartSnapModes(true)


smartSnapHandler.disableSmartSnapMode(.....)


smartSnapHandler.enableSmartSnapMode(.....)

// or disable/enable snapping
smartSnapHandler.setSnappingEnabled(true/false)

Best Regards,

Steve

 

 

Super Contributor
Posts: 301
Registered: ‎02-10-2016

Re: GMSC 2016 Java API Spatial Analysis function shows unnecessary crosses

Thanks Steve, it really does the job.

 

Also on this subject, we would like to turn off the coordinate value displaying (from GUI or programming), quite a lot of end-users find it not user-friendly.

 

Image 3.png

 

Kind regards,

Highlighted
Technical Evangelist
Posts: 148
Registered: ‎10-20-2015

Re: GMSC 2016 Java API Spatial Analysis function shows unnecessary crosses

Hi Bob,

 

you can't turn off the displayed coordinate value. The selection tools capture a point and that's the same functionality as for editing.

 

Best Regards,

Steve

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.