data = { "mapName": "HYLYWCS", "rackCount": 16, "crnCount": 4, "stbCount": 14, "hpPosition": 0, "minBayNo": 2, "floors": 1, "racks": [{ "type": "rack", "id": "rack16", "top": 650, "left": 412, "width": 1046, "height": 24, "minBayNo": 2, "maxBayNo": 24 }, { "type": "rack", "id": "rack15", "top": 624, "left": 412, "width": 1046, "height": 24, "minBayNo": 2, "maxBayNo": 24 }, { "type": "rack", "id": "rack14", "top": 569, "left": 412, "width": 1046, "height": 24, "minBayNo": 2, "maxBayNo": 24 }, { "type": "rack", "id": "rack13", "top": 543, "left": 412, "width": 1046, "height": 24, "minBayNo": 2, "maxBayNo": 24 }, { "type": "rack", "id": "rack12", "top": 484, "left": 412, "width": 1099, "height": 24, "minBayNo": 2, "maxBayNo": 64 }, { "type": "rack", "id": "rack11", "top": 458, "left": 412, "width": 1099, "height": 24, "minBayNo": 2, "maxBayNo": 64 }, { "type": "rack", "id": "rack10", "top": 399, "left": 412, "width": 1099, "height": 24, "minBayNo": 2, "maxBayNo": 64 }, { "type": "rack", "id": "rack9", "top": 373, "left": 412, "width": 1099, "height": 24, "minBayNo": 2, "maxBayNo": 64 }, { "type": "rack", "id": "rack8", "top": 344, "left": 405, "width": 979, "height": 24, "minBayNo": 2, "maxBayNo": 16 }, { "type": "rack", "id": "rack7", "top": 318, "left": 405, "width": 979, "height": 24, "minBayNo": 2, "maxBayNo": 16 }, { "type": "rack", "id": "rack6", "top": 263, "left": 405, "width": 979, "height": 24, "minBayNo": 2, "maxBayNo": 16 }, { "type": "rack", "id": "rack5", "top": 237, "left": 405, "width": 979, "height": 24, "minBayNo": 2, "maxBayNo": 16 }, { "type": "rack", "id": "rack3", "top": 180, "left": 357, "width": 1027, "height": 24, "minBayNo": 2, "maxBayNo": 31 }, { "type": "rack", "id": "rack1", "top": 97, "left": 357, "width": 1027, "height": 24, "minBayNo": 2, "maxBayNo": 31 }, { "type": "rack", "id": "rack4", "top": 207, "left": 357, "width": 1027, "height": 24, "minBayNo": 2, "maxBayNo": 31 }, { "type": "rack", "id": "rack2", "top": 123, "left": 357, "width": 1027, "height": 24, "minBayNo": 2, "maxBayNo": 31 }], "rackDescs": [{ "type": "rackDescs", "id": "lb_desc16", "text": "#16", "top": 651, "left": 1471, "width": 41, "height": 23 }, { "type": "rackDescs", "id": "lb_desc15", "text": "#15", "top": 626, "left": 1472, "width": 40, "height": 23 }, { "type": "rackDescs", "id": "lb_desc14", "text": "#14", "top": 565, "left": 1469, "width": 41, "height": 23 }, { "type": "rackDescs", "id": "lb_desc13", "text": "#13", "top": 541, "left": 1472, "width": 40, "height": 23 }, { "type": "rackDescs", "id": "lb_desc12", "text": "#12", "top": 485, "left": 1517, "width": 41, "height": 23 }, { "type": "rackDescs", "id": "lb_desc11", "text": "#11", "top": 460, "left": 1518, "width": 38, "height": 23 }, { "type": "rackDescs", "id": "lb_desc10", "text": "#10", "top": 399, "left": 1515, "width": 42, "height": 23 }, { "type": "rackDescs", "id": "lb_desc9", "text": "#9", "top": 375, "left": 1518, "width": 33, "height": 23 }, { "type": "rackDescs", "id": "lb_desc8", "text": "#8", "top": 349, "left": 1389, "width": 33, "height": 23 }, { "type": "rackDescs", "id": "lb_desc7", "text": "#7", "top": 321, "left": 1389, "width": 32, "height": 23 }, { "type": "rackDescs", "id": "lb_desc6", "text": "#6", "top": 264, "left": 1387, "width": 33, "height": 23 }, { "type": "rackDescs", "id": "lb_desc5", "text": "#5", "top": 235, "left": 1388, "width": 32, "height": 23 }, { "type": "rackDescs", "id": "lb_desc4", "text": "#4", "top": 206, "left": 1388, "width": 33, "height": 23 }, { "type": "rackDescs", "id": "lb_desc3", "text": "#3", "top": 179, "left": 1389, "width": 32, "height": 23 }, { "type": "rackDescs", "id": "lb_desc2", "text": "#2", "top": 123, "left": 1389, "width": 33, "height": 23 }, { "type": "rackDescs", "id": "lb_desc1", "text": "#1", "top": 95, "left": 1389, "width": 30, "height": 23 }], "crns": [{ "type": "crane", "id": "crn-4", "text": "4", "top": 597, "left": 500, "width": 93, "height": 22 }, { "type": "track", "id": "lb_track4", "text": "", "top": 606, "left": 366, "width": 1150, "height": 2 }, { "type": "crane", "id": "crn-1", "text": "1", "top": 153, "left": 500, "width": 93, "height": 22 }, { "type": "crane", "id": "crn-2", "text": "2", "top": 291, "left": 500, "width": 93, "height": 22 }, { "type": "crane", "id": "crn-3", "text": "3", "top": 428, "left": 500, "width": 93, "height": 22 }, { "type": "track", "id": "lb_track2", "text": "", "top": 300, "left": 359, "width": 1066, "height": 2 }, { "type": "track", "id": "lb_track3", "text": "", "top": 438, "left": 359, "width": 1200, "height": 2 }, { "type": "track", "id": "lb_track1", "text": "", "top": 164, "left": 315, "width": 1112, "height": 2 }], "stns": [{ "type": "stn", "id": "site-112", "text": "112", "top": 458, "left": 311, "width": 100, "height": 24 }, { "type": "stn", "id": "site-111", "text": "111", "top": 458, "left": 209, "width": 100, "height": 24 }, { "type": "stn", "id": "site-114", "text": "114", "top": 568, "left": 311, "width": 100, "height": 24 }, { "type": "stn", "id": "site-113", "text": "113", "top": 568, "left": 209, "width": 100, "height": 24 }, { "type": "stn", "id": "site-105", "text": "105", "top": 262, "left": 201, "width": 100, "height": 24 }, { "type": "stn", "id": "site-109", "text": "109", "top": 399, "left": 208, "width": 100, "height": 24 }, { "type": "stn", "id": "site-108", "text": "108", "top": 318, "left": 303, "width": 100, "height": 24 }, { "type": "stn", "id": "site-107", "text": "107", "top": 318, "left": 201, "width": 100, "height": 24 }, { "type": "stn", "id": "site-106", "text": "106", "top": 262, "left": 303, "width": 100, "height": 24 }, { "type": "stn", "id": "site-104", "text": "104", "top": 180, "left": 255, "width": 100, "height": 24 }, { "type": "stn", "id": "site-103", "text": "103", "top": 180, "left": 153, "width": 100, "height": 24 }, { "type": "stn", "id": "site-102", "text": "102", "top": 122, "left": 255, "width": 100, "height": 24 }, { "type": "stn", "id": "site-101", "text": "101", "top": 122, "left": 153, "width": 100, "height": 24 }, { "type": "stn", "id": "site-110", "text": "110", "top": 399, "left": 310, "width": 100, "height": 24 }] } // 库位图 function getMap() { let mapName = "