Select to view content in your preferred language

Double click on layer doesn't enlarge the map in the IE10

878
1
06-09-2014 11:37 PM
joewang
Emerging Contributor
Hi Everyone, I just joined here and this is my first question here, If I did something wrong ,Please kindly correct me . thanks.

I am just a newbie of Arcgis javascript , I created a map which contains a layer . The layer has pop-up infowindow whenever I click on the layer.
The webmap can be viewed from https://accela.maps.arcgis.com/home/webmap/viewer.html?webmap=8e900bdba72f451cbf5141a9a6073532

and Currently the map can be shown successfully in my web site except a problem .

I used below code to generate the map.
var mapDef = esriUtils.createMap("8e900bdba72f451cbf5141a9a6073532", "divMap");//divMap is an id of div.
mapDef.then(lang.hitch(this, function (response) {
                var map = response.map;});



I found If I viewed it in the browser chrome/Firefox/IE9. Double-click on the layer will zoom-in the map immediately.  But if I view it within IE10/IE11 . double-click will pop up a infowindow which contains a link "zoom to"  to make the map zoom in.

So my question is can I disable the popup infowindows and just enlarge the map immediately when double click on my layer in IE10 ? (I just want only the single click to popup property window.)

If it can not be made or Arcgis doesn't support, Someone please tell me , thanks you in advance.

Any comments are appreciated.


Thanks,
Joe
0 Kudos
1 Reply
joewang
Emerging Contributor
After debug into the Arcgis js code . I found something useful in the source code.(By the way , Is there any debug version of Arcgis javascript code to be downloaded ? I just get them from the temporary download folder of Browser. and format the code in the http://jsbeautifier.org/. save to local file. etc .. It is a really hard work to be done. Strongly recommend Arcgis open source their javascript lib. Anyone agree with me ?)

Ok . Go back to my topic. 🙂

I found when loading arcgis javascript lib , it will determine what kind of browser client it is . you can see this function in the module "esri/sniff".
and I found arcgis will add a feature named "esri-poiter" in there . the code is

d.add("esri-pointer",navigator.pointerEnabled || navigator.msPointerEnabled);


Since in the IE10 the navigator.msPointerEnabled is true. so the feature test will be true for IE10. but in the other browser is false. This will determine what features will be added to the map.

For example in the module "esri/MapNavigationManager" will test this feature.
If it is false or undefined. Then will add dbl-click event handler for the map.

So for the issue in my last post , The solution I can think out is removing this feature before I create map. The code looks like below.

sn.cache["esri-pointer"] = undefined;
            var mapDef = esriUtils.createMap(mapConfig.map.itemId, this.mapDivId, {
                mapOptions: {
                    slider: false,
                    nav: false,            
                    infoWindow: custInfoWin
                }
            }); 


sn represent dojo/has module.

Fortunately In my test (IE10: Browser mode :ie10  document mode : standards ). The double click will enlarge the map immediately.
So far I didn't found any further issues. So I guess it works.

But I am still not sure if it is ok for this solution.  I hope someone can give some comments to it. thanks.
0 Kudos