i have created a simple feature data with polygons and inserted the information into the PostGIS db
table as follow:
CREATE TABLE polys (
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name VARCHAR(64),
poly GEOMETRY(POLYGON, 4326)
);
inserted all polygons features as follows:
INSERT INTO
polys (name, poly)
VALUES
( ‘name’, ST_MakeEnvelope(, , , , 4326) );
I created a workspace, store then loaded a layer in the GeoServer.
Then I was able to access the polygon vector layer created as follows from cesiumjs
const parameters = {
version: ‘1.1.0’,
format: ‘image/png’,
srs: ‘EPSG:4326’,
transparent: true,
};
const webMapServiceImageryProviderOptions = {
url: geoServerUrl + "/workspace/wms",
layers: layer name,
parameters: parameters,
};
const imageryLayer = new Cesium.ImageryLayer(new Cesium.WebMapServiceImageryProvider(webMapServiceImageryProviderOptions));
viewer.imageryLayers.add(imageryLayer);
//================
However, once I try to read the selected polygon feature with the following:
var pickedObject = pickEntity(click. position);
The result is always [object Object]
even accessing object id, type,data …etc
the result “cannot read properties of undefined (reading ‘id’)”
how can I read all of the property values of the selected feature?