Friday 21 October 2016

InvalidStateError in IE for esri-leaflet


I have a map that works perfectly in Chrome and Firefox, but gets stuck on the httpRequest in IE 11.


I get InvalidStateError in here on httpRequest.timeout = context.options.timeout.


I am a bit lost, not familiar with Request.js and haven't had much luck find any issues like this.


function xmlHttpPost (url, params, callback, context) {
var httpRequest = createRequest(callback, context);


if (typeof context !== 'undefined' && context !== null) {
if (typeof context.options !== 'undefined') {
httpRequest.timeout = context.options.timeout;
}
}

The Global code from the Call stack in the IE debugger shows my query statement as well.


          // style each zone and add to layer group
query.run(function (error, response) {
L.geoJson(response, {

style: function (feature) {
switch (feature.properties.ZONING_) {
case 'CN': return { fillColor: '#FF7800', stroke: false, fillOpacity: 0.35 };
case 'CG': return { fillColor: '#DF73FF', stroke: false, fillOpacity: 0.35 };
case 'S-T4': return { fillColor: '#FFFF73', stroke: false, fillOpacity: 0.35 };
case 'S-T5': return { fillColor: '#FFFF73', stroke: false, fillOpacity: 0.35 };
case 'S-T5-2': return { fillColor: '#FFFF73', stroke: false, fillOpacity: 0.35 };
case 'S-T5-1': return { fillColor: '#FFFF73', stroke: false, fillOpacity: 0.35 };
}
}

}).addTo(zoningLayerGroup);
});

Answer



It looks like this is an IE10/11 specific bug (problem isn't reproducible in 9 or Edge), but with your help i was able to identify a workaround.




The fix has been included in esri-leaflet 2.0.0


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...