M.App Enterprise Discussions

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
Highlighted
Frequent Contributor
Posts: 159
Registered: ‎01-14-2018
Accepted Solution

Can't fit to the selected elements, because there is no geometry (M.app Enterprise Workflow)

Dear all,

 

In M.app Enterprise workflow I have a list that have a row action that should zoom to the feauture of that row, I used a custom javascript but once I click on that row button it gives the following error"

er zoom.PNG

 

Note: I used the following js:

function zoomTo(layername,featureids){
  SC.Map.setActiveLayer(layername).then(function(){
      return SC.Map.clearSelectedElements().then(function(){
          return SC.Map.setSelectedElements(featureids).then(function(){
              return SC.Map.setMapScale(900).then(function(){
              return SC.Map.fitSelectedElements().then(function(){
                  return SC.Map.closeWebBrowser();
              });
          });
      });
        });
  }).fail(function (error) {
          alert(error);
  });
}

and I still can run these custom js on other workflows refering to the same same layer and the same table name in the database.

 

Best Regards

Khaled

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

Re: Can't fit to the selected elements, because there is no geometry (M.app Enterprise Workflow)

Hi Khaled,

 

please check:

  • you are passing the right values (IDs)
  • you are using the right layer name
  • there is geometry for the selected feature
  • primary key and geometry field are correctly set in Studio content and in your workflow definition

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial