I created a web map in Leaflet using QGIS and the QGIS2Web Plugin. I want to be able to copy and paste this file onto a tablet, and also keep this file on the local network drive for my coworkers to access. I noticed that QGIS allows me to save a file as GeoJSON and the only difference between that and the JS files in the data folder is the extra code
var variable =at the beginning of the latter.
I tried saving the GeoJSON into the data folder and loading it using an AJAX request and while it worked fine in Firefox as well as Internet Explorer 11 when I went to the F12 Developer Tools and put it in IE10 mode, it didn't load in IE11. The F12 developer tools told me that there were extra commas, but after deleting those it told me it didn't support the measure and search tools (which is weird as they work fine in the original html file), and then after I commented those out it would crash and give me a "this file stopped loading due to a long-running script" message.
Ultimately all I want to do is save myself the extra steps of saving my GeoJson file, opening it in Notepad, adding
var variable = to the beginning of the code, and saving it as a JS file. Is there any way that I can do this without using an AJAX request, as this doesn't seem to work in Internet Explorer 11? I feel like this should be an easy thing to do.