Select to view content in your preferred language

dojo.io.script.jsonp_dojoIoScript Error

4533
7
02-22-2011 01:07 AM
Muhammad_Abdul_HadiMuhammad_Ab
Deactivated User
I have added 2 feature layers in my map having mode as MODE_ONDEMAND and attached info window functions.
Every things works fine but after some time I start to get some errors as

dojo.io.script error
Error: undefined


and then a lot of following errors with just the numbers changed

dojo.io.script.jsonp_dojoIoScript_Buildings11_0_000013959502222241174_2288_4575 is undefined
dojo.io.script.jsonp_dojoIoScript_Airports00_0_00714726513778765_3_9 is undefined

There is no effect on functionality and everything works fine even with these errors.
I made sure if I have added dojo.require("dojo.io.script"); but it still give me same errors.

What causes these errors? Can I ignore it? is there something I am missing?
Following is the code I used to add layers.
  
//Airports Layer
var featureLayer = new esri.layers.FeatureLayer("http://localhost/ArcGIS/rest/services/MyMap/MapServer/0",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
dojo.connect(featureLayer,"onMouseOver",mapControl.showAirportInfoWindow);
mapControl.map.addLayer(featureLayer);

//Buildings Layer
var featureLayerBuildings = new esri.layers.FeatureLayer("http://localhost/ArcGIS/rest/services/MyMap/MapServer/1",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});

dojo.connect(featureLayerBuildings,"onMouseOver",mapControl.showBuildingInfoWindow);
mapControl.map.addLayer(featureLayerBuildings);
0 Kudos
7 Replies
Charles__Jamie_Phillips
Occasional Contributor
Have you tried using Fiddler2 or Firebug to see what the http traffic looks like?

Do these errors occur if you do not pan or zoom? 

If it is only happening when you are panning and zooming then I would guess something is occuring with the on demand update requests.
0 Kudos
Muhammad_Abdul_HadiMuhammad_Ab
Deactivated User
Have you tried using Fiddler2 or Firebug to see what the http traffic looks like?

Do these errors occur if you do not pan or zoom? 

If it is only happening when you are panning and zooming then I would guess something is occuring with the on demand update requests.


I am using Firebug. In Net tab I do not find any errors when these error occurs.
Yes they do only happen when I am panning or zooming in or out.
Should I change mode from on demand to something else?
0 Kudos
Charles__Jamie_Phillips
Occasional Contributor
I would change it just to see if you have a different result.
0 Kudos
IhabEl_Attar
Emerging Contributor
Hello,
I am getting the same error. Did anyone find a solution ??

Thanks
0 Kudos
DainisBerzins
New Contributor
I am also getting same error when Feature layer is added to map and after doing some zoom scrolling
0 Kudos
EdSaunders
Regular Contributor
I am also getting same error when Feature layer is added to map and after doing some zoom scrolling


Hi all, I'm getting the same errors but it's not affecting functionality.  The network traffic is not showing any errors so I'll test with other modes and report back.  Anyone resolve this issue?

Thanks,
Ed
0 Kudos
Mindaugas_ižas
Emerging Contributor
It has something to do with .refresh() function
I had same errors when i added new element to the Layer and then refreshed it.
I solved it by adding timeout of at least 10ms before refreshing the Layer.
Not sure if it helps to you.
I also had this function on each layer:
dojo.connect(municipalityApp[name], "onEditsComplete", function()
{
       municipalityApp[name].refresh();
}
which coused me a lot of errors with new js API version (2,8)
0 Kudos