Select to view content in your preferred language

features not showing up in Firefox

915
4
02-09-2012 11:47 AM
PatrickThorsell
Emerging Contributor
http://maps.co.scott.mn.us/IncidentViewer/
Click on 'Go To Map'
'Check' on Crash
'Check' on DWI
'Check' on Vandalism
Vandalism will display in IE and Chrome, but not Firefox. Any ideas???
0 Kudos
4 Replies
derekswingley1
Deactivated User
The problem might be with URL length. Since your app can generate URLs over 2k characters, it's a good idea to set up a proxy. Can you do that?

For testing, the link below works in chrome but 404s in firefox: 

http://maps.co.scott.mn.us/ArcGIS/rest/services/InternalServices/SC_AllCrime_UTM/MapServer/export?dp...{%22xmin%22%3A425362.24879349704%2C%22ymin%22%3A4944418.17487935%2C%22xmax%22%3A476568.75120650296%2C%22ymax%22%3A4961283.808610617%2C%22spatialReference%22%3A{%22wkid%22%3A26915}}&bboxSR=26915&imageSR=26915&size=1260%2C415&layerDefs=2%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B3%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B4%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B5%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B6%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B7%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B8%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B9%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B10%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B11%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B12%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B13%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B14%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B15%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B16%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B17%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B18%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27%3B19%3ACALLDATE%20%3E%3D%20%2711%2F11%2F2011%27%20AND%20CALLDATE%20%3C%3D%20%272%2F9%2F2012%27&f=image

And it's 2142 characters. I didn't think firefox imposed a limit like this but that's the only thing I can come up with off the top of my head.
0 Kudos
StephenLead
Honored Contributor
Vandalism will display in IE and Chrome, but not Firefox. Any ideas???


I'm actually finding that Vandalism is showing in Firefox, but Crash isn't showing.

I think it's something to do with the complicated logic which is used in the script at http://maps.co.scott.mn.us/IncidentViewer/Javascript/Generic.js

for (var i = 0, il = inputs.length; i < il; i++) {
  if (inputs.checked) {
    visible.push(inputs.id);
    if (i == 11) { //manually turn on hidden crash layers
      for (var j = 12, jEnd = 17; j <= jEnd; j++) {
        visible.push(inputs.id);
       }
     }
  }
}


This seems to be trying to display multiple Crash layers from http://maps.co.scott.mn.us/ArcGIS/rest/services/InternalServices/SC_AllCrime_UTM/MapServer and presumably there's some error in this logic.

I'd start debugging in this region of the script to see if you can pin down the problem.

Cheers,
Steve

PS you're using a very old version of the JS API - it might be worth testing on a newer version to see if that resolves the issue
0 Kudos
derekswingley1
Deactivated User
you're using a very old version of the JS API - it might be worth testing on a newer version to see if that resolves the issue


Great point! I noticed the app is using 1.5 but forgot to mention it. That also explains why the API isn't trying to use a proxy for URLs longer than 2k characters. Please upgrade.
0 Kudos
PatrickThorsell
Emerging Contributor
Upgrading to API 2.6 solved the problem! Thank you to everyone for your help.
Now, my start extent shifted to the west and I can't seem to get it to 'center' on my basemap at startup? I'll keep playing with it.
Thanks!
0 Kudos