Zoom to feature generates error

637
1
Jump to solution
02-23-2012 08:46 AM
MichaelZierten
New Contributor
when I try to search and zoom:

var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features);

if (graphicsExtent)
{
ndwrMap.extent = graphicsExtent;
}

The first line above generates an error:


TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.esri.ags.utils::GraphicUtil$/getGraphicsExtent()

But it returns all the attributes to a datagrid, but for some reason no geometry.

TIA
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Do you have the Shape and or ObjectID fields hidden in the MXD for that featureclass? If so that is the issue.

View solution in original post

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Do you have the Shape and or ObjectID fields hidden in the MXD for that featureclass? If so that is the issue.
0 Kudos