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 
Posts: 100
Registered: ‎02-10-2017

PSS Get all features from a FC



I'm trying to get all features from a specific FC in a PSS service but the result is always the same: none of the features that exists are returned. It always return empty [].



$GP.edit.features.find({featureClassId: "FeatureClass1", mapStateId: 'map', featureIds: [], mapServiceId: 'a6d1-afdd-ac9a-e359'}, function(result){console.log(result.features);}, function(){console.log('Error executing action!');})


Also if I try to obtain it without $GP the result is the same:



Any hint about this issues?





Technical Evangelist
Posts: 1,407
Registered: ‎09-11-2015

Re: PSS Get all features from a FC

[ Edited ]

Hi Antonio,


First of all, $GP.edit.features.find() is not used for getting all features. It is used for getting a certain feature by some ID. If you want to get all the features, you should rather use e.g. exportFeatureCollections. This code works fine for me:


   definitionName: "PersonalStorage",
   name: "PSS1"
}, function (result1) {
      mapServiceId: result1.mapServiceId
   }, function (result2) {
      var fIds = result2.featureClassIds;
      //console.log("Feature Class Ids:");

         mapServiceId: result1.mapServiceId,
         featureClassIds: fIds
      }, function (res) {
         console.log("Features Returned:");
      }, function (err) {
   }, function (err2) {
}, function (err3) {


Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial