Select to view content in your preferred language

What causes this error?

866
5
12-26-2012 05:35 PM
jonathanlee1
Emerging Contributor
I been trying to applyEdits to a feature and after I hit this error I cannot use the dojo.connect(layer, "onEditsComplete", function(add, updates, deletes)...  to further update the feature

TypeError: Unable to get value of the property 'getCellsInExtent': object is null or undefined[\code]


any idea what causes this error?
0 Kudos
5 Replies
jonathanlee1
Emerging Contributor
I think I know what is causing this error, it might be that I must state the Xmin, Ymin, Xmax and Ymax to the point so that it can show an extent.
0 Kudos
CorySilva
Deactivated User
Last time I got that error, I believe that something was returning a null.  It ended up that I commented out some dojo reference in an html tag. 

Also, I am not really sure about your intent but perhaps using something like this would work better:

dojo.connect( layernamehere, "onBeforeApplyEdits", function( a,u,d) {
// do really cool stuff here
});
0 Kudos
danbecker
Frequent Contributor
I been trying to applyEdits to a feature and after I hit this error I cannot use the dojo.connect(layer, "onEditsComplete", function(add, updates, deletes)...  to further update the feature

TypeError: Unable to get value of the property 'getCellsInExtent': object is null or undefined[\code]

any idea what causes this error?


the featLayer that your applying edits to...is it currently within visible scale range?
0 Kudos
jonathanlee1
Emerging Contributor
the featLayer that your applying edits to...is it currently within visible scale range?


Yes the visible scale range is currently 4 and I have zoomed to that level before trying to add a feature and applyEdits to the layer.

I was thinking is it possible that my graphic instantiating without a symbol will cause this?
var graphic = new esri.Graphic(point, null, attributes);
but i don't really think that is the problem.
0 Kudos
jonathanlee1
Emerging Contributor
Last time I got that error, I believe that something was returning a null.  It ended up that I commented out some dojo reference in an html tag. 

Also, I am not really sure about your intent but perhaps using something like this would work better:

dojo.connect( layernamehere, "onBeforeApplyEdits", function( a,u,d) {
// do really cool stuff here
});


Hi, thanks for the suggestion but I will need the objectId that was created for the feature so that I can updated an attribute in the feature upon creation.
0 Kudos