Hexagon Geospatial
MENU

M.App Enterprise

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 77
Registered: ‎10-12-2015
Accepted Solution

Digitizing in Mapp Enterprise Desktop Application

Hello,

 

Does anybody have a sample code for digitizing using the Workflow Engine?

 

In GeoMedia Smartclient, I could digitize using IG.captureGeometry().

By investigating the scripts, i noticed that this was replaced by SC.digitize(layer, config, featureIds), but I can't figure out what the parameters should be (layer, config, featureIds), and I did not find anything regarding this in the documentation.

 

Regards,

Radu

Staff
Posts: 1,034
Registered: ‎10-18-2015

Re: Digitizing in Mapp Enterprise Desktop Application

Hi Radu,

 

I guess documentation is not ready yet. Here is a sample (should be self explanatory):

 

SC.digitize('BuildingExtension', {commands: ['GE_MODIFY'], startOnLoad: 'GE_MODIFY'}, [{FORM.id}])

Most of the parameters are like in GMSC.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Technical Evangelist
Posts: 137
Registered: ‎09-01-2015

Re: Digitizing in Mapp Enterprise Desktop Application

I've updated the documentation. As soon as the publish goes through, you will find the description at the ACTION part of "Place widget in a form".

Frequent Contributor
Posts: 143
Registered: ‎04-29-2016

Re: Digitizing in Mapp Enterprise Desktop Application

Hello,

 

1- I have a problem after digitizing a feature at postgis layer, while trying to save..

 

error_snapshot.png

 

2- also, I have an error while trying to digitize a feature at MSSQL 2008 Spatial

 

error_snapshot1.png

 

 

Frequent Contributor
Posts: 77
Registered: ‎10-12-2015

Re: Digitizing in Mapp Enterprise Desktop Application

I am also getting the java.lang.Throwable: Layer The keyfield type must be specified using MSSQL 2012 Spatial.

 

Radu

Frequent Contributor
Posts: 143
Registered: ‎04-29-2016

Re: Digitizing in Mapp Enterprise Desktop Application

Hello sschuett,

 

I have checked the documentation >> Place Widgets in Forms topic. but no script is avaliable. May you please, send the link of documentation that contains the scripts.

Regards,

Maha

Technical Evangelist
Posts: 137
Registered: ‎09-01-2015

Re: Digitizing in Mapp Enterprise Desktop Application

[ Edited ]

Obviously there are some problems with the publishing. So here is the information you would get via the documentation:

 

If you want to digitize geometries with the Workflow in M.App Enterprise you have to use the Value Editor and type in the following JavaScript code. Please note this is just an example:
SC.digitize('BuildingExtension', {commands: ['GE_NEWPOLYGON'], startOnLoad: 'GE_NEWPOLYGON'})


SC.digitize -- Digitize command
'Building Extension' -- LayerName in ' '
{commands: ... -- which commands should be executed. In this case, there should be a new polygon digitized. The following list shows all available NEW digitizing commands:
GE_NEWPOINT
GE_NEWTEXT
GE_NEWPOLYLINE
GE_NEWPOLYGON
GE_NEWRECTANGLE


And there are some commands for the EDIT of existing geometries:
GE_MODIFY
GE_ROTATE
GE_TEXTCHANGE
GE_SUBSTRACT
GE_MERGE
GE_DELETECOLLECTIONPART
GE_SPLITPOLYGON
GE_SPLITPOLYLINE
GE_MERGEPOLYLINES
GE_ADDPOINTTOCOLLECTION
GE_MOVE
GE_DELETE
GE_ADOPT


For example an edit action can look like:
SC.digitize('BuildingExtension', {commands: ['GE_MODIFY'], startOnLoad: 'GE_MODIFY'}, [{FORM.id}])

 

Hope that helps,

Stefan

Frequent Contributor
Posts: 143
Registered: ‎04-29-2016

Re: Digitizing in Mapp Enterprise Desktop Application

Hello Stefan,

Thank you very much..

 

May you please, send the required script to center the map to a selected feature.. Iam using the following script which generate a validation errors (this script is working correctly at GMSC:

SCRIPT[IG.setActiveFeature('building');IG.setSelectedElements({ROW.ID1});IG.fitSelectedElements();IG.closeWebBrowser()]

 

Regards,

Maha

Staff
Posts: 1,034
Registered: ‎10-18-2015

Re: Digitizing in Mapp Enterprise Desktop Application

Hi Maha,

 

the JS API has changed, you will find all the methods in the coming documentation. Here is an example of a row action in a list controller to fit an element:

 

SC.Map.setActiveLayer('YourLayer');
SC.Map.clearSelectedElements();
SC.Map.setSelectedElements({ROW.id});
SC.Map.fitSelectedElements();
SC.Map.clearSelectedElements();

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Frequent Contributor
Posts: 143
Registered: ‎04-29-2016

Re: Digitizing in Mapp Enterprise Desktop Application

Hello Stefano,

 

I have copied & paste the script that you have sent and changed the layer name. it returns "Error Occurred: Unexpected Exception Occured" once click the button that call the workflow action without any message at the log.

 

Regards,

Maha

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.