Created
June 19, 2014 11:44
-
-
Save hitsujixgit/fc88e660c80c6eae78be to your computer and use it in GitHub Desktop.
Read 2 json files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file読み込み制御用 | |
var readTopofileDone = false; | |
var readAttrfileDone = false; | |
// filedata格納変数 | |
var topodata; | |
var attrdata; | |
var map_width = 500; | |
var map_height = 650; | |
var svg; | |
function readTopofile(json) { | |
topodata = json; | |
readTopofileDone = true; | |
} | |
function readAttrfile(json) { | |
attrdata = json; | |
readAttrfileDone = true; | |
} | |
d3.json("yokohama_topo_out.json", function(error, json) { | |
if(error) return console.warn(error); | |
readTopofile(json); | |
if (readTopofileDone && readAttrfileDone) { | |
main(topodata, attrdata); | |
} | |
}); | |
d3.json("yokohama_codes.json", function(error, json) { | |
if(error) return console.warn(error); | |
readAttrfile(json); | |
if (readTopofileDone && readAttrfileDone) { | |
main(topodata, attrdata); | |
} | |
}); | |
function main(topo, attr) { | |
// break | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment