Map & query results are not show up when using browsers like IE & Firefox

2509
7
Jump to solution
12-19-2014 09:37 AM
MayJeff
Occasional Contributor

Hell all,

I can't figure out why the map & query results won't display when using Firefix and IE.  Only able to use it in Chrome?

Does anyone got this problem too?

Here is my jsfiddle:

Edit fiddle - JSFiddle

Thank you.

0 Kudos
1 Solution

Accepted Solutions
HeikoHeijenga
Esri Contributor

You're not using sort correctly, needs to be something like:

        var sortedFeatures = results.features.sort(function(a,b) {

                return a.attributes.PARCELID.localeCompare(b.attributes.PARCELID);

            });

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

May Jeff,

    Other browsers do not support the Array.prototype.sort (the way that you are trying to use it).

Here is the workaround for your code.

var sortedFeatures = results.features;//.sort('PARCELID');

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

look at using the Query orderByFields

Query | API Reference | ArcGIS API for JavaScript

0 Kudos
HeikoHeijenga
Esri Contributor

Robert, all browsers support Array.sort...

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

True, but not the way he was using it. Only Chrome did not have issue with his use of it. I will edit my response.

0 Kudos
HeikoHeijenga
Esri Contributor

You're not using sort correctly, needs to be something like:

        var sortedFeatures = results.features.sort(function(a,b) {

                return a.attributes.PARCELID.localeCompare(b.attributes.PARCELID);

            });

View solution in original post

RobertScheitlin__GISP
MVP Esteemed Contributor

May Jeff,

   This link may help as well.

Array.prototype.sort() - JavaScript | MDN

MayJeff
Occasional Contributor

Thank you for taking your times to look into it.  I updated the sorting part based on Heiko.  Edit fiddle - JSFiddle  and I also do another way for sorting based on Robert help link mentioned on his last posted Edit fiddle - JSFiddle

When I use notepadd ++ to create a file and run it on IE -  always got Access Denied - See my attachment file.

Both links above using JSFiddle can see both map and query results when using IE but not firefox.

Using firefox so far nothing show up at all.  Got any ideas?

Thank you.

IEerror.gif

0 Kudos