jeff.pace

javascript 3.14 issue with Google Street View

Discussion created by jeff.pace on Sep 9, 2015
Latest reply on Sep 9, 2015 by jeff.pace

Just wanted to make people aware of an issue with the 3.14 api and Street View

 

The 3.14 api introduces a new css element in esri.css

 

.map .container .layersDiv > div {
    pointer-events: none;
}

 

This breaks google street view if you have it embedded in your map div as a child, as it uses pointer-elements

 

As a workaround, when street view is visible, loop through the elements and turn pointer-events on

 

array.forEach(query('.map .container .layersDiv > div'), function(node){
   domStyle.set(node, 'pointerEvents', 'auto');  
});

 

and then when you close street view, turn them back off

array.forEach(query('.map .container .layersDiv > div'), function(node){
   domStyle.set(node, 'pointerEvents', 'none');  
});

Outcomes