Web Application with Basic Viewer in IE9 problem

1231
9
02-02-2012 05:49 AM
SteveLi
New Contributor
Web Application with Basic Viewer in IE9 problem

    On ArcGIS.com, I made a Web Application with Javascript Basic Viewer template. When I open the Web Application in IE9, there is an offset of where I clicked on the map. For example, you have to click on the right of a symbol to get popup. In measure tool, the flag shows up on the right of mouse click.

This problem doesn't happen in Firefox.

Any fix for it?
0 Kudos
9 Replies
KellyHutchins
Esri Frequent Contributor
It's an issue with the application's css and the fix for this will be included in the next update to ArcGIS.com. If you are using a local copy of the template you can fix the issue by saving the attached file into the css folder and adding the following to the index.html file just below the tag that includes the layout.css file

    <link rel="stylesheet" type="text/css" href="css/layout.css">
    <!--[if IE]>
        <link rel="stylesheet" type="text/css" href="css/ie.css" />
    <![endif]-->

0 Kudos
ZorbaConlen
Occasional Contributor

Hi, this bug seems to have returned with IE10. I have two apps, both using the basic viewer template. One is public facing - http://www.arcgis.com/apps/OnePane/basicviewer/index.html?appid=47856a432d904a5a8d8a9cab64b98bc1.

Nothing custom, just out of box config.

The other is an internal facing app which is based on basic viewer template (using an older version of api) and heavily customized.

Both have same behavior. You have to click several pixels to right of the feature to get the popup. This just started when we upgraded to IE10. Chrome, Firefox, IE9 all fine.

We are at 10.1 version of arcgis server still, if that matters.

Thanks

0 Kudos
KellyHutchins
Esri Frequent Contributor

Zorba,

Looks like this is probably happening because loading conditional css is no longer supported after IE9. It sounds like you have a local install of this template is that the case? If so we can test to see if the issue is due to the ie stylesheet by adding the following code after the line that sets document.doClick =false in layout.js. Let me know if this fixes the issue locally?

     require(["dojo/sniff"],function(has){

    

        if(has("ie") || has("trident")){

            var ss = document.createElement("link");

            ss.type = "text/css";

            ss.rel = "stylesheet";

            ss.href = "css/ie.css";

            document.getElementsByTagName("head")[0].appendChild(ss);

        }

     });

0 Kudos
ZorbaConlen
Occasional Contributor

Thanks for the replay Kelly. That worked for my locally hosted app. Its an older version of the api, so there is no "document.doClick=false" line, but I figured out how to use it.

The other app I mentioned in my first post is not locally hosted, and has the same problem - http://www.arcgis.com/apps/OnePane/basicviewer/index.html?appid=47856a432d904a5a8d8a9cab64b98bc1. Seems this is a bug with the template, which is actually now called the "Classic Viewer" I believe. Are you planning to address it in an upcoming release?

Thanks

0 Kudos
KellyHutchins
Esri Frequent Contributor

Yes Zorba this issue will be fixed in the Classic Viewer at the next release.

0 Kudos
SteveLi
New Contributor
Thanks so much.

I have a another issue with the Javascript Basic Viewer template.  I deploy the template to my local IIS, but the print won't work.  I believe it's using a server function on ArcGIS.com, but my map services not open to the internet.  How do I host that print service on my local server?
0 Kudos
JeffPace
MVP Alum
Thanks so much.

I have a another issue with the Javascript Basic Viewer template.  I deploy the template to my local IIS, but the print won't work.  I believe it's using a server function on ArcGIS.com, but my map services not open to the internet.  How do I host that print service on my local server?


You cannot.  For now.  The print service has not been released for local hosting. If you want to use it, it must be public.
0 Kudos
KellyHutchins
Esri Frequent Contributor
The Basic Viewer template uses the ArcGIS.com print service - if you can't access the internet then you won't be able to use this print functionality.  If you do have internet access you can set the printurl configOption in the index.html to 'http://www.arcgis.com/sharing/tools/print' and the print should work locally.



Thanks so much.

I have a another issue with the Javascript Basic Viewer template.  I deploy the template to my local IIS, but the print won't work.  I believe it's using a server function on ArcGIS.com, but my map services not open to the internet.  How do I host that print service on my local server?
0 Kudos
MeiLingFreeman
New Contributor
It's an issue with the application's css and the fix for this will be included in the next update to ArcGIS.com. If you are using a local copy of the template you can fix the issue by saving the attached file into the css folder and adding the following to the index.html file just below the tag that includes the layout.css file

    <link rel="stylesheet" type="text/css" href="css/layout.css">
    <!--[if IE]>
        <link rel="stylesheet" type="text/css" href="css/ie.css" />
    <![endif]-->



-----------------
I have the same problem displaying my web app using IE 8 or 9.  I tried the suggestion and it did display the web properly. However, i have a popup splash page when the web app opens, and the popup splash page is still a mess up...missing image and not in the correct size as I designed originally.  How to fix the popup splash? Thanks in advance!
0 Kudos