To give some background, I'm working on a project that has quite a few restrictions given the environment it will run in. I need to be able to view and interact with geospatial data, perform geospatial data entry (ie click a point on the map and fill in the attributes), no new software or server can be installed on the client machine, and it cannot be added to an existing web server.
My solution is to use OpenLayers from an html file opened off of the client's file system. This resulted in cross-origin security violations in browsers when attempting to read spatial data files off of the local hard drive from javascript (despite all the files being from the same directory), and modifying the browser security is not an option. My workaround for this is to add a file drag and drop where the user "uploads" the file and it's read into OpenLayers, but I have to make it easy for the user and dropping 10+ files individually isn't practical.
I want to merge each of the 10+ GeoJSON files I use into a single file, but keep them distinct, such that I can load them into OpenLayers as individual layers in order to apply individual styling and not try to merge or generalize unrelated attributes. I can't think of a way to do this cleanly where OpenLayers will still be able to interpret the GeoJSON structure.
Is it practical to wrap the GeoJSON in XML and break it apart in javascript before sending it to OpenLayers? Can I wrap GeoJSON in JSON or would it confuse parsers?