Select to view content in your preferred language

GraphicUtil.getGraphicsExtent limit on number of graphics?

644
3
04-19-2013 08:48 AM
DerrickMartin
New Contributor II
Is there a limit on the number of graphics that the GraphicUtil.getGraphicsExtent can use? I'm doing some work on an application and it gets a list of locations passed in from an external system. I take these, and generate an array of graphic elements and then pass that to the function to get the full extent of the graphics. However, if there are more than a couple of thousand points in the array the function fails with an error. "TypeError: Error #1009: Cannot access a property or method of a null object reference." If there are fewer graphics in the array it works just fine. Didn't see any documented limit but obviously something isn't working with larger number of graphics in the array?
Tags (2)
0 Kudos
3 Replies
omega_cancer
Occasional Contributor II
Is there a limit on the number of graphics that the GraphicUtil.getGraphicsExtent can use? I'm doing some work on an application and it gets a list of locations passed in from an external system. I take these, and generate an array of graphic elements and then pass that to the function to get the full extent of the graphics. However, if there are more than a couple of thousand points in the array the function fails with an error. "TypeError: Error #1009: Cannot access a property or method of a null object reference." If there are fewer graphics in the array it works just fine. Didn't see any documented limit but obviously something isn't working with larger number of graphics in the array?



Can you provide the snippet so that anyone might get an idea?

I don't think there is any limit but debugging mode will tell the whole story clean and clear, So disturb it. 🙂
)
0 Kudos
EokNgo
by
New Contributor III
Some sample code or more detailed context might get more replies.

In some previous code, I've tried to loop through and pull an extent from a group of points that happen to have the exact same coordinates and would throw a null object reference error because a graphic that consists of a single mappoint does not have a second dimension and thus no extent. Not sure if this applies to you or not.
0 Kudos
YannCabon
Esri Contributor
Hi,

Can you check if you have nulls in your array of Graphics.
That can lead to this error.
0 Kudos