Message: '0.geometry' is null or not an object

654
2
03-20-2013 01:59 AM
SaiDake
New Contributor
Hi, i get "Message: '0.geometry' is null or not an object" javascript error when i try to render the map in IE. It works fine in mozilla.

plotAddressId= function plotAddressId(addressId, state, attributes) {
          // alert(attributes);
            addressIdQuery = new esri.tasks.Query();
            addressIdQuery.returnGeometry = true;
            addressIdQuery.where = "ADDRESS_KEY = '" + state + addressId + "'";
            addressIdQueryTask.execute(addressIdQuery, function(results) {
              var geom = results.features[0].geometry;
              var graphic = new esri.Graphic(geom, locationSymbol);
              graphic.setAttributes(attributes);
              locationGraphicsLayer.add(graphic);
              zoomToLocations();
           });
          }

This piece of code is generating it. However, when i uncomment the alert message, i dnt see the script error. Its basically waitings for somethings to load prior to it. What is the work around for this?
0 Kudos
2 Replies
JasonScharf
New Contributor III
Are you using AMD modules in your code?

I've seen dojo's AMD loader do this in IE when you include an AMD module with a script tag, instead of with require.

Bad:

<script src="myModule.js"></script>

Good:

<script type="text/javascript">
    require("myModule.js");
</script>
0 Kudos
SaiDake
New Contributor
Thx for replying!! No, im not using.
0 Kudos