Thank you James. What you suggested was the key! I was calling the FeatureTable functions before the table was loaded. If I wait for the FeatureTable::doneLoading signal to be emitted, it works. I can then call the FeatureTable::queryFeatures function, and connect the FeatureTable::queryFeaturesCompleted signal to a slot where I iterate over the list of features contained in the FeatureQueryResult object. From each feature I get the geometry, from which I can get the Envelope and the center coordinates. Now I will look into connecting some of these points in pair with polylines to create flow maps.
... View more
Hello all, I am using the runtime SDK for Qt to display the content of a shapefile on a map. I am first creating a ShapefileFeatureTable from the shapefile, and then a FeatureLayer. ShapefileFeatureTable * featureTable = new ShapefileFeatureTable ( dataPath , this ); FeatureLayer * layer = new FeatureLayer ( featureTable , this ); All works correctly and I see the region boundaries contained in the shapefile when I append the layer to the map. I can also choose the type of renderer to display the data. What I want to do is find the center or centroid of each of these regions, maybe using the Envelope returned from an extent() function, and then connect different center points with custom polylines. The problem is that I don't know how to get to the drawn data (points/polylines/polygons) contained in the shapefile. I tried using member functions from the FeatureTable class with no success. For example FeatureTable::numberOfFeatures() returns 0, and FeatureTable::fields() returns an empty list. How can I access the region boundaries data that is drawn to be able to process it? If possible, I would like to to everything in the runtime SDK. Thank you very much for your help! Jean-Philippe
... View more