How to load this .json file into a google API?

2

I'm having trouble uploading a .json file that contains polylines from the city of Rio de Janeiro within the Google Maps API.

I want to apply these route polylines between cities in Rio de Janeiro, on top of a google maps, but I do not know exactly how I will do this procedure. I have already loaded the Data Layer with GeoJSON from the layer.json file.

How should I do it? Here is the file "graph.json" for me to load.

[{"firstVertex":1518,"secondVertex":1540,"firstToSecond":492.8503540594684,"secondToFirst":1362.579672879155},{"firstVertex":1535,"secondVertex":1552,"firstToSecond":2025.26509792799,"secondToFirst":13553.11652777927},{"firstVertex":1535,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1518,"secondVertex":1535,"firstToSecond":16303.013043173569,"secondToFirst":33819.91040069911},{"firstVertex":1494,"secondVertex":1518,"firstToSecond":184.969718350111,"secondToFirst":30.5499648200069},{"firstVertex":1494,"secondVertex":1517,"firstToSecond":145.47991482996946,"secondToFirst":29.590028349995528},{"firstVertex":1494,"secondVertex":1515,"firstToSecond":4432.3763821403,"secondToFirst":2316.18809116996},{"firstVertex":1494,"secondVertex":1514,"firstToSecond":469.299924520221,"secondToFirst":292.269874409954},{"firstVertex":1494,"secondVertex":1510,"firstToSecond":270.169908220007,"secondToFirst":71.1198862700582},{"firstVertex":1518,"secondVertex":1542,"firstToSecond":5268.046650109668,"secondToFirst":27359.28486832011},{"firstVertex":1494,"secondVertex":1507,"firstToSecond":31.119991479990702,"secondToFirst":3.6199939800024},{"firstVertex":1535,"secondVertex":1535,"firstToSecond":3450692.3067607046,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1508,"firstToSecond":117.6699384099819,"secondToFirst":3.97999200000402},{"firstVertex":1517,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1506,"firstToSecond":1105.161083930351,"secondToFirst":427.7299537699317},{"firstVertex":1517,"secondVertex":1549,"firstToSecond":1795.8891838897507,"secondToFirst":4304.777428540043},{"firstVertex":1518,"secondVertex":1518,"firstToSecond":9984.89562234499,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1502,"firstToSecond":473.840085439986,"secondToFirst":177.63988048003432},{"firstVertex":1535,"secondVertex":1540,"firstToSecond":99155.58597305331,"secondToFirst":170213.0008796674},{"firstVertex":1535,"secondVertex":1542,"firstToSecond":56199.75397063767,"secondToFirst":100298.65822441738},{"firstVertex":1518,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1497,"firstToSecond":1810.26018380049,"secondToFirst":376.04014252003196},{"firstVertex":1518,"secondVertex":1528,"firstToSecond":7468.026316639131,"secondToFirst":14215.26883698929},{"firstVertex":1494,"secondVertex":1496,"firstToSecond":14455.300222054446,"secondToFirst":18162.095343797362},{"firstVertex":1535,"secondVertex":1549,"firstToSecond":8755.363130201888,"secondToFirst":23029.084438622685},{"firstVertex":1494,"secondVertex":1494,"firstToSecond":41118.1906094937,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1549,"firstToSecond":31.5299784299857,"secondToFirst":11.4299738600139},{"firstVertex":1494,"secondVertex":1542,"firstToSecond":397.320610229958,"secondToFirst":296.8003441096808},{"firstVertex":1476,"secondVertex":1549,"firstToSecond":19.73006543001286,"secondToFirst":82.43012906996204},{"firstVertex":1518,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1494,"secondVertex":1540,"firstToSecond":15908.85747644247,"secondToFirst":10008.094720107947},{"firstVertex":1476,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1518,"secondVertex":1549,"firstToSecond":1516.13803550067,"secondToFirst":9178.63864113287},{"firstVertex":1494,"secondVertex":1535,"firstToSecond":67945.04865754196,"secondToFirst":32552.81528460228},{"firstVertex":1553,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1476,"secondVertex":1542,"firstToSecond":182.51049916037772,"secondToFirst":510.1614598212157},{"firstVertex":1494,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1476,"secondVertex":1540,"firstToSecond":1004.5714779495338,"secondToFirst":3609.213665157291},{"firstVertex":1494,"secondVertex":1528,"firstToSecond":117.6599171501082,"secondToFirst":21.18999642000113},{"firstVertex":1480,"secondVertex":1540,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1542,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1535,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1514,"firstToSecond":15212.017990899236,"secondToFirst":19758.29420399313},{"firstVertex":1480,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1528,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1518,"firstToSecond":582.2188010005843,"secondToFirst":152.78976378008747},{"firstVertex":1496,"secondVertex":1517,"firstToSecond":287.6095279802219,"secondToFirst":289.0897824600471},{"firstVertex":1496,"secondVertex":1515,"firstToSecond":3414.1870839999874,"secondToFirst":5514.078657787943},{"firstVertex":1496,"secondVertex":1506,"firstToSecond":26140.609621142215,"secondToFirst":25583.09382557354},{"firstVertex":1496,"secondVertex":1510,"firstToSecond":1719.9780455399846,"secondToFirst":463.4094843101009},{"firstVertex":1496,"secondVertex":1507,"firstToSecond":367.1396273500235,"secondToFirst":258.0699974798258},{"firstVertex":1496,"secondVertex":1508,"firstToSecond":1039.1976460912838,"secondToFirst":117.189839720066},{"firstVertex":1496,"secondVertex":1497,"firstToSecond":24418.12599827171,"secondToFirst":20792.531415230358},{"firstVertex":1480,"secondVertex":1515,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1517,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1496,"firstToSecond":158429.1164000947,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1518,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1502,"firstToSecond":6869.901930601075,"secondToFirst":8046.87290327056},{"firstVertex":1480,"secondVertex":1514,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1510,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1552,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1508,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1507,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1506,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1502,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1497,"secondVertex":1515,"firstToSecond":506.710027339959,"secondToFirst":926.700249050048},{"firstVertex":1497,"secondVertex":1514,"firstToSecond":1129.351368220048,"secondToFirst":2474.431678239932},{"firstVertex":1497,"secondVertex":1517,"firstToSecond":41.689978270013455,"secondToFirst":79.31997015000105},{"firstVertex":1480,"secondVertex":1497,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1480,"secondVertex":1496,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1549,"firstToSecond":198.6295787802475,"secondToFirst":218.9196749701326},{"firstVertex":1497,"secondVertex":1518,"firstToSecond":148.79989711996402,"secondToFirst":45.739970509991196},{"firstVertex":1496,"secondVertex":1535,"firstToSecond":134190.37404028836,"secondToFirst":104948.01011682198},{"firstVertex":1480,"secondVertex":1494,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1497,"secondVertex":1506,"firstToSecond":9742.82477061038,"secondToFirst":5973.14899186933},{"firstVertex":1480,"secondVertex":1492,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1497,"secondVertex":1507,"firstToSecond":41.67002824999646,"secondToFirst":74.9900484499909},{"firstVertex":1497,"secondVertex":1508,"firstToSecond":67.79996447996515,"secondToFirst":23.00997292001282},{"firstVertex":1496,"secondVertex":1540,"firstToSecond":7208.497651059314,"secondToFirst":6508.7915172234},{"firstVertex":1497,"secondVertex":1510,"firstToSecond":160.42006216999698,"secondToFirst":84.7399261200066},{"firstVertex":1496,"secondVertex":1542,"firstToSecond":818.5296727696282,"secondToFirst":673.7399325898224},{"firstVertex":1497,"secondVertex":1497,"firstToSecond":7992.8381234691,"secondToFirst":0.0},{"firstVertex":1496,"secondVertex":1528,"firstToSecond":306.95965776993927,"secondToFirst":217.50986419004323},{"firstVertex":1496,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1497,"secondVertex":1502,"firstToSecond":6066.0536860311495,"secondToFirst":6218.709196981971},{"firstVertex":1480,"secondVertex":1480,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1542,"firstToSecond":2654.45141232007,"secondToFirst":1948.1805886107363},{"firstVertex":1514,"secondVertex":1540,"firstToSecond":9890.024598432055,"secondToFirst":8435.511873213063},{"firstVertex":1514,"secondVertex":1535,"firstToSecond":58804.29683851709,"secondToFirst":21924.662343140764},{"firstVertex":1531,"secondVertex":1549,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1531,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1528,"firstToSecond":513.249730719736,"secondToFirst":171.1399290299807},{"firstVertex":1531,"secondVertex":1540,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1531,"secondVertex":1542,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1531,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1517,"firstToSecond":410.12979432008865,"secondToFirst":192.88998619002882},{"firstVertex":1514,"secondVertex":1518,"firstToSecond":987.348601980442,"secondToFirst":204.39984507011923},{"firstVertex":1514,"secondVertex":1515,"firstToSecond":2322.277460919883,"secondToFirst":1538.841264739702},{"firstVertex":1531,"secondVertex":1535,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1514,"firstToSecond":77393.4521585331,"secondToFirst":0.0},{"firstVertex":1515,"secondVertex":1542,"firstToSecond":10334.305036090387,"secondToFirst":12489.463532863407},{"firstVertex":1515,"secondVertex":1540,"firstToSecond":20588.519232513183,"secondToFirst":27751.64720945609},{"firstVertex":1515,"secondVertex":1535,"firstToSecond":79853.1790060819,"secondToFirst":80337.29501408305},{"firstVertex":1515,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1549,"secondVertex":1549,"firstToSecond":45381.5536156969,"secondToFirst":0.0},{"firstVertex":1515,"secondVertex":1528,"firstToSecond":12322.013536753911,"secondToFirst":4829.015406756707},{"firstVertex":1514,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1549,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1514,"secondVertex":1549,"firstToSecond":660.699241180264,"secondToFirst":679.629099480365},{"firstVertex":1515,"secondVertex":1518,"firstToSecond":9076.41685694402,"secondToFirst":2222.07579067164},{"firstVertex":1514,"secondVertex":1552,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1515,"secondVertex":1515,"firstToSecond":114745.816293118,"secondToFirst":0.0},{"firstVertex":1515,"secondVertex":1517,"firstToSecond":10138.764047474548,"secondToFirst":7875.474542047015},{"firstVertex":1492,"secondVertex":1510,"firstToSecond":4928.687255749915,"secondToFirst":7875.610612339431},{"firstVertex":1476,"secondVertex":1528,"firstToSecond":81.1401312300105,"secondToFirst":69.89015762994867},{"firstVertex":1492,"secondVertex":1507,"firstToSecond":67.21998041998948,"secondToFirst":81.56006736001544},{"firstVertex":1492,"secondVertex":1508,"firstToSecond":119.48998198998696,"secondToFirst":97.10995963991472},{"firstVertex":1492,"secondVertex":1514,"firstToSecond":1601.372150750225,"secondToFirst":2676.9729750999395},{"firstVertex":1476,"secondVertex":1535,"firstToSecond":49423.88357601788,"secondToFirst":56494.81613463176},{"firstVertex":1492,"secondVertex":1517,"firstToSecond":193.80998232000272,"secondToFirst":381.3803330600313},{"firstVertex":1492,"secondVertex":1518,"firstToSecond":511.50978130985914,"secondToFirst":219.08009490992401},{"firstVertex":1492,"secondVertex":1515,"firstToSecond":2614.490217789701,"secondToFirst":13073.47185495976},{"firstVertex":1476,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1492,"secondVertex":1494,"firstToSecond":489.0900117398905,"secondToFirst":1627.6307530698728},{"firstVertex":1492,"secondVertex":1492,"firstToSecond":281699.68703057367,"secondToFirst":0.0},{"firstVertex":1476,"secondVertex":1514,"firstToSecond":334.36077887988944,"secondToFirst":1015.4926751197252},{"firstVertex":1476,"secondVertex":1508,"firstToSecond":30.6699917700017,"secondToFirst":31.50003810992581},{"firstVertex":1492,"secondVertex":1497,"firstToSecond":726.8903509397949,"secondToFirst":874.0805388300762},{"firstVertex":1476,"secondVertex":1507,"firstToSecond":21.590026520006866,"secondToFirst":55.66019766011788},{"firstVertex":1492,"secondVertex":1496,"firstToSecond":1957.969535159254,"secondToFirst":3352.848483957553},{"firstVertex":1476,"secondVertex":1510,"firstToSecond":353.610330849986,"secondToFirst":239.18989255968438},{"firstVertex":1492,"secondVertex":1502,"firstToSecond":135.9200300499699,"secondToFirst":659.7100360094886},{"firstVertex":1515,"secondVertex":1549,"firstToSecond":1348.76844951009,"secondToFirst":3040.85476020175},{"firstVertex":1492,"secondVertex":1506,"firstToSecond":1140.812034132115,"secondToFirst":974.1510905804906},{"firstVertex":1515,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1476,"secondVertex":1515,"firstToSecond":983.1412563788759,"secondToFirst":1927.9650465593777},{"firstVertex":1476,"secondVertex":1518,"firstToSecond":141.6500526198438,"secondToFirst":28.87000560997201},{"firstVertex":1476,"secondVertex":1517,"firstToSecond":57.2700622399517,"secondToFirst":58.360018629933},{"firstVertex":1476,"secondVertex":1497,"firstToSecond":170.96021279000632,"secondToFirst":360.7605343799998},{"firstVertex":1492,"secondVertex":1540,"firstToSecond":3920.2082025581576,"secondToFirst":10805.600527923434},{"firstVertex":1517,"secondVertex":1540,"firstToSecond":2319.5448013017276,"secondToFirst":1752.1913692598887},{"firstVertex":1476,"secondVertex":1496,"firstToSecond":792.6800803492704,"secondToFirst":1856.260808808073},{"firstVertex":1492,"secondVertex":1542,"firstToSecond":538.8404495598608,"secondToFirst":1083.4717679905675},{"firstVertex":1517,"secondVertex":1542,"firstToSecond":9752.720188147929,"secondToFirst":16844.84514104794},{"firstVertex":1476,"secondVertex":1494,"firstToSecond":141.20010757994189,"secondToFirst":723.3614326793752},{"firstVertex":1476,"secondVertex":1492,"firstToSecond":24431.35056281909,"secondToFirst":36638.16888393734},{"firstVertex":1476,"secondVertex":1506,"firstToSecond":243.33021321032356,"secondToFirst":252.44073596073437},{"firstVertex":1517,"secondVertex":1535,"firstToSecond":25291.127503482276,"secondToFirst":18795.131849211935},{"firstVertex":1492,"secondVertex":1549,"firstToSecond":102.80001505994159,"secondToFirst":236.19997346977289},{"firstVertex":1476,"secondVertex":1502,"firstToSecond":39.69003695999985,"secondToFirst":63.88007709996547},{"firstVertex":1492,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1476,"secondVertex":1480,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1517,"secondVertex":1528,"firstToSecond":19734.39766429447,"secondToFirst":14858.470737763308},{"firstVertex":1492,"secondVertex":1528,"firstToSecond":223.88014514010018,"secondToFirst":580.9101295503233},{"firstVertex":1476,"secondVertex":1476,"firstToSecond":17306.55798556495,"secondToFirst":0.0},{"firstVertex":1517,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1492,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1517,"secondVertex":1517,"firstToSecond":30321.52672214502,"secondToFirst":0.0},{"firstVertex":1517,"secondVertex":1518,"firstToSecond":16610.299758356436,"secondToFirst":5416.635175940644},{"firstVertex":1492,"secondVertex":1535,"firstToSecond":222725.7953491658,"secondToFirst":235510.35663164276},{"firstVertex":1510,"secondVertex":1514,"firstToSecond":7545.40051268452,"secondToFirst":9665.60045952791},{"firstVertex":1502,"secondVertex":1514,"firstToSecond":219.24018726979,"secondToFirst":295.04011404992656},{"firstVertex":1502,"secondVertex":1515,"firstToSecond":414.3295879200044,"secondToFirst":125.7798982900101},{"firstVertex":1510,"secondVertex":1515,"firstToSecond":955.208433399956,"secondToFirst":890.65969209002},{"firstVertex":1510,"secondVertex":1510,"firstToSecond":29446.80769086,"secondToFirst":0.0},{"firstVertex":1502,"secondVertex":1510,"firstToSecond":58.93996464999947,"secondToFirst":9.839998829999999},{"firstVertex":1502,"secondVertex":1506,"firstToSecond":5298.812151278103,"secondToFirst":6638.113511508393},{"firstVertex":1502,"secondVertex":1507,"firstToSecond":6.48999578999842,"secondToFirst":8.39999647999512},{"firstVertex":1502,"secondVertex":1508,"firstToSecond":39.399930960030275,"secondToFirst":5.92998673000734},{"firstVertex":1510,"secondVertex":1518,"firstToSecond":1090.60921014983,"secondToFirst":328.569766459958},{"firstVertex":1502,"secondVertex":1502,"firstToSecond":3589.8987052200064,"secondToFirst":0.0},{"firstVertex":1510,"secondVertex":1517,"firstToSecond":538.4300201099612,"secondToFirst":619.4703103500651},{"firstVertex":1510,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1502,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1502,"secondVertex":1528,"firstToSecond":34.15000928000157,"secondToFirst":10.24001325999868},{"firstVertex":1510,"secondVertex":1528,"firstToSecond":794.1202061100155,"secondToFirst":659.560155319986},{"firstVertex":1510,"secondVertex":1540,"firstToSecond":3087.0154612606634,"secondToFirst":3819.88484332147},{"firstVertex":1502,"secondVertex":1518,"firstToSecond":50.939933970015105,"secondToFirst":14.58997931000609},{"firstVertex":1502,"secondVertex":1517,"firstToSecond":21.46006146991902,"secondToFirst":9.09001268998646},{"firstVertex":1510,"secondVertex":1535,"firstToSecond":22479.04208433056,"secondToFirst":22794.59443843089},{"firstVertex":1510,"secondVertex":1542,"firstToSecond":3316.8509687768174,"secondToFirst":4750.171955499633},{"firstVertex":1502,"secondVertex":1542,"firstToSecond":41.19994695002456,"secondToFirst":61.03999178000569},{"firstVertex":1502,"secondVertex":1540,"firstToSecond":296.70011186980514,"secondToFirst":370.88951921006174},{"firstVertex":1510,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1502,"secondVertex":1535,"firstToSecond":14217.133506438196,"secondToFirst":7370.85720647976},{"firstVertex":1510,"secondVertex":1549,"firstToSecond":3578.65707141988,"secondToFirst":5021.42629299974},{"firstVertex":1502,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1502,"secondVertex":1549,"firstToSecond":4.8599935100006695,"secondToFirst":6.89000243999915},{"firstVertex":1542,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1542,"secondVertex":1549,"firstToSecond":27826.361385404198,"secondToFirst":45898.593429092245},{"firstVertex":1542,"secondVertex":1552,"firstToSecond":1009.6740346399821,"secondToFirst":2014.948058259994},{"firstVertex":1542,"secondVertex":1542,"firstToSecond":152147.71655744984,"secondToFirst":0.0},{"firstVertex":1528,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1528,"secondVertex":1528,"firstToSecond":12668.939064081775,"secondToFirst":0.0},{"firstVertex":1528,"secondVertex":1540,"firstToSecond":1212.8115966906616,"secondToFirst":1458.7205626503387},{"firstVertex":1528,"secondVertex":1542,"firstToSecond":6860.270307000756,"secondToFirst":17606.119477611177},{"firstVertex":1528,"secondVertex":1535,"firstToSecond":25645.93395094794,"secondToFirst":23767.889594088352},{"firstVertex":1528,"secondVertex":1549,"firstToSecond":1790.109569759511,"secondToFirst":6210.317948089874},{"firstVertex":1528,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1517,"firstToSecond":132.39996542997713,"secondToFirst":113.17003689006515},{"firstVertex":1540,"secondVertex":1540,"firstToSecond":226112.23410493747,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1518,"firstToSecond":235.1899687898162,"secondToFirst":90.4500098799397},{"firstVertex":1497,"secondVertex":1535,"firstToSecond":31123.45819505614,"secondToFirst":25969.902997659785},{"firstVertex":1540,"secondVertex":1542,"firstToSecond":20144.90576598631,"secondToFirst":25111.482655184038},{"firstVertex":1497,"secondVertex":1528,"firstToSecond":54.22000169000208,"secondToFirst":79.21999737000246},{"firstVertex":1506,"secondVertex":1514,"firstToSecond":4876.518722404213,"secondToFirst":3870.8245620810853},{"firstVertex":1497,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1515,"firstToSecond":548.8101423701701,"secondToFirst":604.03098088009},{"firstVertex":1506,"secondVertex":1510,"firstToSecond":750.1501416899739,"secondToFirst":139.0601267900169},{"firstVertex":1497,"secondVertex":1540,"firstToSecond":963.9006496302676,"secondToFirst":1810.3887460198198},{"firstVertex":1540,"secondVertex":1549,"firstToSecond":328.77985010997236,"secondToFirst":692.5506073694542},{"firstVertex":1497,"secondVertex":1542,"firstToSecond":178.74023446009397,"secondToFirst":306.160094900127},{"firstVertex":1506,"secondVertex":1506,"firstToSecond":27308.383224150017,"secondToFirst":0.0},{"firstVertex":1540,"secondVertex":1552,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1507,"firstToSecond":75.8100900500434,"secondToFirst":69.18013053007799},{"firstVertex":1540,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1508,"firstToSecond":5164.0096443152715,"secondToFirst":84.10997942990775},{"firstVertex":1497,"secondVertex":1549,"firstToSecond":23.019971150001503,"secondToFirst":37.3899742600052},{"firstVertex":1506,"secondVertex":1535,"firstToSecond":33526.94841448693,"secondToFirst":22927.9985814241},{"firstVertex":1506,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1528,"firstToSecond":63.31006443998716,"secondToFirst":97.37006411998071},{"firstVertex":1497,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1506,"secondVertex":1549,"firstToSecond":70.24000597997956,"secondToFirst":63.270014809895486},{"firstVertex":1507,"secondVertex":1518,"firstToSecond":570.7289857504429,"secondToFirst":192.40970356010416},{"firstVertex":1507,"secondVertex":1517,"firstToSecond":249.78992359994868,"secondToFirst":263.23978154996894},{"firstVertex":1507,"secondVertex":1514,"firstToSecond":1827.809500458331,"secondToFirst":1667.4498150191666},{"firstVertex":1480,"secondVertex":1549,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1507,"secondVertex":1515,"firstToSecond":218.5297117600778,"secondToFirst":415.2094880001254},{"firstVertex":1507,"secondVertex":1510,"firstToSecond":1995.348332159911,"secondToFirst":1551.048731979763},{"firstVertex":1506,"secondVertex":1542,"firstToSecond":357.13031046023315,"secondToFirst":437.1105291602713},{"firstVertex":1480,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1507,"secondVertex":1508,"firstToSecond":7414.054587218016,"secondToFirst":10074.129239710694},{"firstVertex":1506,"secondVertex":1540,"firstToSecond":1122.1808462600688,"secondToFirst":2147.900462037589},{"firstVertex":1507,"secondVertex":1507,"firstToSecond":74.44999590992967,"secondToFirst":0.0},{"firstVertex":1507,"secondVertex":1535,"firstToSecond":5208.638322938241,"secondToFirst":7521.4072335860355},{"firstVertex":1507,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1507,"secondVertex":1528,"firstToSecond":293.6798181499954,"secondToFirst":315.8896996899932},{"firstVertex":1506,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1508,"secondVertex":1515,"firstToSecond":732.658075452166,"secondToFirst":807.0787279809241},{"firstVertex":1508,"secondVertex":1517,"firstToSecond":799.4594463800887,"secondToFirst":501.3599272598138},{"firstVertex":1507,"secondVertex":1549,"firstToSecond":643.1588150505581,"secondToFirst":1496.1875592409926},{"firstVertex":1508,"secondVertex":1518,"firstToSecond":1918.4863286918899,"secondToFirst":334.9395528701318},{"firstVertex":1507,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1508,"secondVertex":1508,"firstToSecond":13472.54542137635,"secondToFirst":0.0},{"firstVertex":1507,"secondVertex":1540,"firstToSecond":43.520044500018514,"secondToFirst":101.8498096500786},{"firstVertex":1508,"secondVertex":1510,"firstToSecond":10011.065825569141,"secondToFirst":6475.8867597495555},{"firstVertex":1507,"secondVertex":1542,"firstToSecond":1296.719170969689,"secondToFirst":1677.448633369809},{"firstVertex":1508,"secondVertex":1514,"firstToSecond":557.2890608404036,"secondToFirst":2287.6755256223173},{"firstVertex":1508,"secondVertex":1531,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1508,"secondVertex":1535,"firstToSecond":8187.454475797846,"secondToFirst":10738.916199084093},{"firstVertex":1508,"secondVertex":1528,"firstToSecond":1035.0397422702297,"secondToFirst":597.219750510054},{"firstVertex":1508,"secondVertex":1549,"firstToSecond":1675.578357420369,"secondToFirst":2655.0071214107247},{"firstVertex":1508,"secondVertex":1553,"firstToSecond":0.0,"secondToFirst":0.0},{"firstVertex":1508,"secondVertex":1542,"firstToSecond":3244.038714000393,"secondToFirst":3705.5784347398017},{"firstVertex":1508,"secondVertex":1540,"firstToSecond":159.89017638996353,"secondToFirst":227.31962455008716}]

This file represents a layer on the map with the municipalities of the state of Rio de Janeiro. But on top of this layer, I need to load a file called graph.json that contains the routes through the polylines demarcated in that file. But I have no idea more or less how to load this ".json" with polyline.

    
asked by anonymous 30.09.2015 / 13:34

1 answer

0

You should do a Ajax or use the Jquery function getJson () :

$.getJSON( "ajax/test.json", function( data ) {
  //A variável data está o seu arquivo json que é retornado.
  console.log(data);    
 });
    
23.02.2017 / 15:57