Changed map.js to take the map data rather than the json filename.  This also means I had to change base.html to decode the json file and pass the map data.