Hi There, I am trying to do a query and check for a geometry that is not null, what is the best way to do this check. I tried to use x property and see if I could filter out value with Nan but this doesnt work.
Appreciate any feedback.
Thanks
Jay
shSrcLayer.queryFeatures(query, function (fs) {
shSrcGLFS = fs;
if (shSrcGLFS.features.length > 0) {
shSrcGLgeom = shSrcGLFS.features[0].geometry;
//alert("shSrcGLgeom: " + shSrcGLgeom.x + "," + shSrcGLgeom.y);
}
});
var mp = new Multipoint(new SpatialReference({ wkid: 3857 }));
if (shSrcGLgeom .x !== 'NaN') {
mp.addPoint(shSrcGLgeom );
}