Select to view content in your preferred language

ParkFinder App - Browser Issue

1292
12
11-29-2012 10:47 AM
BrianLord1
Deactivated User
I am new to Javascript and have been working on configuring the ParkFinder Template from the Local Government App Gallery (http://www.arcgis.com/home/item.html?id=734512384d3b4b849aba2db0e33a80f2).  So far I just swapped out all the ESRi layer/field names for mine.  I got the app to work on Chrome and FIrefox, but run into an issue when testing it in IE7.

The app loads and everything is fine until I try to search for parks.  The map says "Loading" and never actually loads anything.  As you can see in the attached image, the search Results portion is populated.  However the Park info and Directions boxes do not even show up.  I am guessing it is something with the routing functionality, but am not sure where to start.

Any help would be greatly appreciated.

Thanks,
Mark

Also, I just noticed that the infowindow does not work when I click on the park either.
0 Kudos
12 Replies
JeffPace
MVP Alum
I am new to Javascript and have been working on configuring the ParkFinder Template from the Local Government App Gallery (http://www.arcgis.com/home/item.html?id=734512384d3b4b849aba2db0e33a80f2).  So far I just swapped out all the ESRi layer/field names for mine.  I got the app to work on Chrome and FIrefox, but run into an issue when testing it in IE7.

The app loads and everything is fine until I try to search for parks.  The map says "Loading" and never actually loads anything.  As you can see in the attached image, the search Results portion is populated.  However the Park info and Directions boxes do not even show up.  I am guessing it is something with the routing functionality, but am not sure where to start.

Any help would be greatly appreciated.

Thanks,
Mark

Also, I just noticed that the infowindow does not work when I click on the park either.


IE7 is not a CORS compliant browser, which means you have cross domain issues, which means you need a proxy setup.
0 Kudos
BrianLord1
Deactivated User
Thanks for the reply.

Is that just an issue with Javascript, because I have a Silverlight app that I created and it runs fine on IE7?
0 Kudos
JeffPace
MVP Alum
Thanks for the reply.

Is that just an issue with Javascript, because I have a Silverlight app that I created and it runs fine on IE7?


not sure.  still better than needed an abandoned plugin though 😉
0 Kudos
BrianLord1
Deactivated User
Yeah, I agree.  It is a completely different app and I will eventually be re-making it in Javascript. 

If it was a cross-domain issue, wouldnt I have issues loading any of the data or running the query that populates the park list?  The map services load fine, its just when i try to search for parks.  Unless it is caused by the app trying to use the routing service from arcgis online.
0 Kudos
JeffPace
MVP Alum
GET requests (less than 2000 characters) don't need a proxy.  POST does (>2000 characters).  my guess is the size of the request is switching the request type to POST.
0 Kudos
TracySchloss
Honored Contributor
I worked through the Park finder example myself.  It didn't work for me until I had my proxy set up correctly.
0 Kudos
BrianLord1
Deactivated User
So I checked the folder I download for the app and a proxy is set up and saved in the same location as my application.

I also have the following code in my html document.
            esri.config.defaults.io.proxyUrl = "proxy.ashx";        //Setting to use proxy file
            esriConfig.defaults.io.alwaysUseProxy = false;
            esriConfig.defaults.io.timeout = 180000;    //ersi request timeout value


If I understood the documentation I read, this set up will automatically use the proxy page if the request exceeds 2000 characters.

Also, the documentation for this app says that it is optimized for IE 7/8/9, Chrome, FireFox so it must be somethign I changed.  The only things I changed were field names and map service names/url's.
0 Kudos
JeffPace
MVP Alum
So I checked the folder I download for the app and a proxy is set up and saved in the same location as my application.

I also have the following code in my html document.
            esri.config.defaults.io.proxyUrl = "proxy.ashx";        //Setting to use proxy file
            esriConfig.defaults.io.alwaysUseProxy = false;
            esriConfig.defaults.io.timeout = 180000;    //ersi request timeout value


If I understood the documentation I read, this set up will automatically use the proxy page if the request exceeds 2000 characters.

Also, the documentation for this app says that it is optimized for IE 7/8/9, Chrome, FireFox so it must be somethign I changed.  The only things I changed were field names and map service names/url's.


That looks fine, did you add your servers to the .config file?
0 Kudos
BrianLord1
Deactivated User
Yep, code is shown below.
<ProxyConfig mustMatch="true">
  <serverUrls>
    <serverUrl url="http://xxxxxxx/ArcGIS/rest/services/"
               matchAll="true"></serverUrl>   

  </serverUrls>

</ProxyConfig>


Do I have to change anything in the proxy.ashx file?
0 Kudos