diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c56776b..15b9f1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,7 +47,7 @@ importers: version: 8.4.38 solid-devtools: specifier: ^0.29.2 - version: 0.29.2(solid-js@1.8.11)(vite@5.0.11) + version: 0.29.2(solid-js@1.8.11)(vite@5.0.11(@types/node@22.5.3)) tailwindcss: specifier: ^3.4.3 version: 3.4.3 @@ -56,10 +56,10 @@ importers: version: 5.3.3 vite: specifier: ^5.0.11 - version: 5.0.11 + version: 5.0.11(@types/node@22.5.3) vite-plugin-solid: specifier: ^2.8.2 - version: 2.8.2(solid-js@1.8.11)(vite@5.0.11) + version: 2.8.2(solid-js@1.8.11)(vite@5.0.11(@types/node@22.5.3)) packages: @@ -640,6 +640,9 @@ packages: '@types/leaflet@1.9.12': resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + '@types/node@22.5.3': + resolution: {integrity: sha512-njripolh85IA9SQGTAqbmnNZTdxv7X/4OYGPz8tgy5JDr8MP+uDBa921GpYEoDDnwm0Hmn5ZPeJgiiSTPoOzkQ==} + '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1862,6 +1865,9 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + update-browserslist-db@1.0.13: resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -2536,6 +2542,11 @@ snapshots: dependencies: '@types/geojson': 7946.0.14 + '@types/node@22.5.3': + dependencies: + undici-types: 6.19.8 + optional: true + '@types/semver@7.5.8': {} '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.3.3))(eslint@8.57.0)(typescript@5.3.3)': @@ -3798,7 +3809,7 @@ snapshots: slash@3.0.0: {} - solid-devtools@0.29.2(solid-js@1.8.11)(vite@5.0.11): + solid-devtools@0.29.2(solid-js@1.8.11)(vite@5.0.11(@types/node@22.5.3)): dependencies: '@babel/core': 7.23.7 '@babel/plugin-syntax-typescript': 7.23.3(@babel/core@7.23.7) @@ -3807,7 +3818,7 @@ snapshots: '@solid-devtools/shared': 0.13.1(solid-js@1.8.11) solid-js: 1.8.11 optionalDependencies: - vite: 5.0.11 + vite: 5.0.11(@types/node@22.5.3) transitivePeerDependencies: - supports-color @@ -3998,6 +4009,9 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + undici-types@6.19.8: + optional: true + update-browserslist-db@1.0.13(browserslist@4.22.2): dependencies: browserslist: 4.22.2 @@ -4018,7 +4032,7 @@ snapshots: validate-html-nesting@1.2.2: {} - vite-plugin-solid@2.8.2(solid-js@1.8.11)(vite@5.0.11): + vite-plugin-solid@2.8.2(solid-js@1.8.11)(vite@5.0.11(@types/node@22.5.3)): dependencies: '@babel/core': 7.23.7 '@babel/preset-typescript': 7.23.3(@babel/core@7.23.7) @@ -4027,22 +4041,23 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.8.11 solid-refresh: 0.6.3(solid-js@1.8.11) - vite: 5.0.11 - vitefu: 0.2.5(vite@5.0.11) + vite: 5.0.11(@types/node@22.5.3) + vitefu: 0.2.5(vite@5.0.11(@types/node@22.5.3)) transitivePeerDependencies: - supports-color - vite@5.0.11: + vite@5.0.11(@types/node@22.5.3): dependencies: esbuild: 0.19.11 postcss: 8.4.38 rollup: 4.9.5 optionalDependencies: + '@types/node': 22.5.3 fsevents: 2.3.3 - vitefu@0.2.5(vite@5.0.11): + vitefu@0.2.5(vite@5.0.11(@types/node@22.5.3)): optionalDependencies: - vite: 5.0.11 + vite: 5.0.11(@types/node@22.5.3) which-boxed-primitive@1.0.2: dependencies: diff --git a/public/n/lines.json b/public/n/lines.json new file mode 100644 index 0000000..613a030 --- /dev/null +++ b/public/n/lines.json @@ -0,0 +1,12 @@ +[ + { + "id": 1, + "name": "1", + "color": "#ea4fb2" + }, + { + "id": 2, + "name": "2", + "color": "black" + } +] \ No newline at end of file diff --git a/public/n/routes_1.json b/public/n/routes_1.json new file mode 100644 index 0000000..09d6e87 --- /dev/null +++ b/public/n/routes_1.json @@ -0,0 +1,6 @@ +[ + { + "name": "D", + "points": [[-16.43611408449085,-71.56457662582399],[-16.43708170446484,-71.56467318534852],[-16.437318461809493,-71.564759016037],[-16.437704478600303,-71.56507015228273],[-16.43908898584533,-71.56543493270875],[-16.43934118126953,-71.56559586524965],[-16.43977866235094,-71.56595528125764],[-16.44035510650618,-71.56601428985597],[-16.44100360413526,-71.56557440757753],[-16.441307264978878,-71.56554222106935],[-16.4417087141788,-71.56565487384798],[-16.442274859075635,-71.56564414501192],[-16.442985111247793,-71.56603574752809],[-16.444364434129913,-71.56604647636415],[-16.444611475999316,-71.56589627265932],[-16.444812197286705,-71.56538665294649],[-16.445002624982866,-71.56519889831544],[-16.44519305249221,-71.56496286392213],[-16.446093720613227,-71.56433522701265],[-16.446464279998143,-71.56397044658662],[-16.446948064796985,-71.56296193599702],[-16.4476788863553,-71.56193733215333],[-16.448718501013264,-71.56080543994905],[-16.44876482034863,-71.5604192018509],[-16.44972208413762,-71.55911028385164],[-16.450669050121338,-71.55950188636781],[-16.45166747664264,-71.5589600801468],[-16.452202713487203,-71.5581500530243],[-16.45243430589496,-71.55781745910646],[-16.453756950570444,-71.55656754970552],[-16.452326229472394,-71.55537128448488],[-16.451662330127366,-71.5549260377884],[-16.449505928210936,-71.55285000801088],[-16.44803400287958,-71.55419111251832],[-16.447869311238982,-71.5541857481003],[-16.446384593628075,-71.55553221702577],[-16.44641032690298,-71.55581653118135],[-16.446868378625545,-71.555934548378],[-16.445052299289685,-71.55775845050813],[-16.44317374811287,-71.55574679374696],[-16.44007538563583,-71.55893325805665],[-16.439756282373104,-71.55928194522859],[-16.438096092680166,-71.56110584735872],[-16.43628438421201,-71.56216263771059],[-16.434787727688384,-71.56215190887453],[-16.43443773390786,-71.56204998493196],[-16.433032605470288,-71.55990421772005],[-16.432862754091463,-71.55980765819551],[-16.432466433630058,-71.5599310398102],[-16.432245111462098,-71.56015634536745],[-16.432106141599874,-71.56076788902284],[-16.431946583487317,-71.56113266944887],[-16.431539967059596,-71.5616261959076],[-16.42878112932906,-71.55944824218751],[-16.418481181795133,-71.55068278312685],[-16.41818263267867,-71.54941678047182],[-16.41835789056568,-71.54899835586549],[-16.419366777931167,-71.54789328575136],[-16.42225443170917,-71.54470682144166],[-16.4225066489863,-71.54422938823701],[-16.422851516978476,-71.54376268386842],[-16.423052260751902,-71.5425342321396],[-16.42317064800826,-71.54162764549257],[-16.424261866280478,-71.53878450393678],[-16.424653056244814,-71.53801739215852],[-16.424879534285353,-71.53753459453584],[-16.425440581021903,-71.53548002243043],[-16.425615586094548,-71.53456270694734],[-16.425996478943297,-71.53413891792299],[-16.42623324979738,-71.53377413749696],[-16.426845764364096,-71.53388142585756],[-16.426922971945565,-71.53380632400514],[-16.426928119116567,-71.5330070257187],[-16.42575970780081,-71.53304994106294],[-16.425382020805007,-71.53293728828432],[-16.42510921838347,-71.5331143140793],[-16.424702587648202,-71.53307139873506],[-16.42319444344202,-71.53182685375215],[-16.42222675430749,-71.53132796287538],[-16.42140833260937,-71.53124749660493],[-16.4204560766114,-71.53139233589174],[-16.418144906171182,-71.53220236301424],[-16.417213223903843,-71.53262615203859],[-16.41650287751858,-71.53317868709566],[-16.415658694382287,-71.5338170528412],[-16.4131003853041,-71.5349864959717],[-16.412395171452776,-71.53511524200441],[-16.412122350809817,-71.53484165668489],[-16.411360510007153,-71.53411209583284],[-16.410454533277075,-71.53257787227632],[-16.409625766777793,-71.53098464012147],[-16.409270580054535,-71.52987420558931],[-16.40902349325588,-71.5284687280655],[-16.40875581553656,-71.52764260768892],[-16.40845210383218,-71.5273153781891],[-16.407911598778853,-71.52581334114076],[-16.407103412231507,-71.52453124523164],[-16.406732777787767,-71.52351200580598],[-16.406300370044494,-71.52281463146211],[-16.405687790763388,-71.5219831466675],[-16.40507520955399,-71.52080833911897],[-16.404184646877496,-71.51963889598848],[-16.4037316423339,-71.51877522468568],[-16.40348454850207,-71.5183997154236],[-16.402393213659135,-71.51755213737489],[-16.401337907638037,-71.51670455932619],[-16.400308335274527,-71.5158784389496],[-16.399577335590926,-71.51534199714662],[-16.399721476590855,-71.5116995573044],[-16.39982958227077,-71.51160299777986],[-16.39982443438263,-71.51143133640291],[-16.399618518744667,-71.51138305664064],[-16.399407454989678,-71.51145815849306],[-16.39679119266764,-71.50865325271027],[-16.39671397312591,-71.50810608207124],[-16.395823372197867,-71.50611588298219],[-16.39589544410075,-71.50600859462159],[-16.395828520191806,-71.50545605956452],[-16.39539094022041,-71.50492498217957],[-16.394639329974606,-71.50423833667176],[-16.39452092535631,-71.50397011577027],[-16.394546665496854,-71.50312253772157],[-16.39452092535631,-71.50400230227845],[-16.39463418194923,-71.50425979434388],[-16.39544242026808,-71.5049464398517],[-16.395607156329206,-71.50491425334351],[-16.396065327766298,-71.50508591472047],[-16.396477166340272,-71.50488206683534],[-16.396621309635364,-71.50484988032716],[-16.396590421795416,-71.50550970374482],[-16.39703314703345,-71.50550433932679],[-16.397120662368334,-71.50465139686006],[-16.397316861757762,-71.50526762008668],[-16.397471300332434,-71.50531053543092],[-16.397558815470365,-71.50502622127534],[-16.398475148081776,-71.50389432907106],[-16.399422363776072,-71.50562703609468],[-16.40059093330978,-71.50485455989839],[-16.403962757618064,-71.51043355464937],[-16.405002606154213,-71.50974690914155],[-16.406099074087503,-71.51157081127168],[-16.410279702669953,-71.50507450103761],[-16.41048560702776,-71.50533199310304],[-16.410948891036064,-71.5062975883484],[-16.41184971789374,-71.50625467300416],[-16.411592339217233,-71.51222527027132],[-16.41162322467637,-71.51242911815645],[-16.411834275182784,-71.512708067894],[-16.41242624489347,-71.51251494884492],[-16.41262699942977,-71.51293337345125],[-16.412415949783426,-71.51338398456575],[-16.415808159041003,-71.51539027690889],[-16.418268631919567,-71.51598036289217],[-16.420270960300837,-71.51664018630983],[-16.42251004344991,-71.51638805866243],[-16.42436305827661,-71.51566386222841],[-16.42567559975737,-71.51888787746431],[-16.425186614751482,-71.51902735233308],[-16.425387356113287,-71.51953160762788],[-16.426041050905813,-71.51939213275911],[-16.42618002510584,-71.5194618701935],[-16.425274117421864,-71.52120530605318],[-16.425047792736184,-71.52218699455263],[-16.42519706208033,-71.52603864669801],[-16.42525368145672,-71.53289973735811],[-16.4253308896707,-71.53468608856203],[-16.424656603566326,-71.5374004840851],[-16.424033787605453,-71.53892397880556],[-16.422999498081907,-71.5414881706238],[-16.422901699832654,-71.54197096824647],[-16.42281979114636,-71.54327988624574],[-16.422691109110254,-71.54372513294221],[-16.422377124584724,-71.54414355754854],[-16.422006519246292,-71.54433131217958],[-16.420992498250737,-71.5454524755478],[-16.41900047206226,-71.54760897159578],[-16.4181011026198,-71.54866039752962],[-16.418090807810206,-71.54886960983278],[-16.416721593274993,-71.55031263828279],[-16.416510548071834,-71.55024826526643],[-16.416284060281942,-71.55006051063539],[-16.416258323016404,-71.54987275600435],[-16.416814247194306,-71.54925048351289],[-16.418440831031216,-71.55072033405305],[-16.424131733393413,-71.55561804771425],[-16.43150003748286,-71.56165301799776],[-16.431973565490395,-71.56116485595705],[-16.432127976547683,-71.56076788902284],[-16.43227209342375,-71.56016170978548],[-16.43248826853736,-71.5599685907364],[-16.432879441941004,-71.55986130237581],[-16.433023558259613,-71.5599310398102],[-16.43441324584529,-71.56204462051393],[-16.43480956233482,-71.56218945980073],[-16.436250706389085,-71.56225919723512],[-16.43817564640912,-71.56114876270296],[-16.440038805475872,-71.55914247035982],[-16.440158542419972,-71.55895471572877],[-16.44310764810332,-71.55590236186983],[-16.44454358386859,-71.55737221240999],[-16.4460978822953,-71.5557897090912],[-16.446422121788814,-71.55576288700105],[-16.446854440270926,-71.5558809041977],[-16.447410276904378,-71.5548884868622],[-16.447966111946002,-71.55436277389528],[-16.448074190796998,-71.55420184135438],[-16.44895940578747,-71.55339717864992],[-16.449489503528966,-71.55385851860048],[-16.44999901358563,-71.55337035655977],[-16.45157385439345,-71.55488312244417],[-16.45230980502918,-71.55538737773897],[-16.453725086866996,-71.55656754970552],[-16.452409657861214,-71.55782282352449],[-16.451658268058484,-71.55894935131074],[-16.450685574197806,-71.55946969985963],[-16.44970772889402,-71.55906200408937],[-16.448740171848755,-71.56041383743288],[-16.448688705913373,-71.56081080436708],[-16.447660918623953,-71.56193733215333],[-16.44690436379199,-71.56296193599702],[-16.446415432229752,-71.56398117542268],[-16.445186230296617,-71.5649199485779],[-16.44478993498551,-71.56534373760225],[-16.44457423678586,-71.56586945056917],[-16.444337488288557,-71.56602501869203],[-16.44298389894412,-71.56598746776582],[-16.442283940295894,-71.56557977199556],[-16.441713340903885,-71.56561732292177],[-16.441311891713557,-71.56548321247102],[-16.440972203288776,-71.56553149223329],[-16.440344292817773,-71.56598210334779],[-16.43979872961245,-71.56591773033144],[-16.439124493722076,-71.56539201736452],[-16.437765721150942,-71.56502187252046],[-16.4373179417436,-71.56469464302064],[-16.437065743691868,-71.56459271907808],[-16.436146188732675,-71.56452298164369]] + } +] diff --git a/public/n/routes_2.json b/public/n/routes_2.json new file mode 100644 index 0000000..511cc27 --- /dev/null +++ b/public/n/routes_2.json @@ -0,0 +1,6 @@ +[ + { + "name": "A", + "points": [[-16.38880429969624,-71.57892644405366],[-16.38698183561494,-71.57500505447389],[-16.387862180562422,-71.57514452934267],[-16.388495408678963,-71.57500505447389],[-16.394065668130754,-71.5745383501053],[-16.394122296567794,-71.57564878463747],[-16.398487784693266,-71.57497823238374],[-16.40105143375194,-71.57348155975343],[-16.40127279142461,-71.57344937324525],[-16.40209644567015,-71.57352447509767],[-16.402117291894537,-71.57283782958986],[-16.40440806169248,-71.57319188117982],[-16.40479929159154,-71.57315969467165],[-16.404670597632578,-71.57175421714784],[-16.40452646029754,-71.57009124755861],[-16.40440806169248,-71.56845510005952],[-16.404449243824104,-71.56822979450227],[-16.404114638752038,-71.56820833683015],[-16.40305958626244,-71.56836926937105],[-16.403064734065076,-71.56926512718202],[-16.399713494378467,-71.56912028789522],[-16.399713494378467,-71.57005906105043],[-16.39926047942928,-71.57083153724672],[-16.397149827701426,-71.56931340694429],[-16.39464275555492,-71.56935632228853],[-16.394606719374973,-71.56899690628053],[-16.394478018678004,-71.56869113445283],[-16.39424635720907,-71.56848192214967],[-16.393793329540102,-71.56833708286287],[-16.393716108809546,-71.56610012054445],[-16.392593830736708,-71.56611084938051],[-16.392197428220527,-71.56305849552156],[-16.392279797640956,-71.56274735927583],[-16.392485721039574,-71.56271517276765],[-16.393371189172772,-71.56281709671022],[-16.393458706153375,-71.56269907951356],[-16.393474150322323,-71.56254887580873],[-16.39263501536742,-71.5615350008011],[-16.392521757611934,-71.56060695648195],[-16.393587407523984,-71.55964136123659],[-16.39279460572929,-71.5570503473282],[-16.392079022117652,-71.55454516410829],[-16.39171350717213,-71.5540248155594],[-16.39144580565011,-71.55379951000215],[-16.391085437635635,-71.55417501926424],[-16.39088980900569,-71.5545290708542],[-16.39086406838188,-71.55465781688692],[-16.391131770703414,-71.5551406145096],[-16.390524291828573,-71.55547857284547],[-16.38761042614386,-71.55481338500978],[-16.387250051034382,-71.55465245246889],[-16.38660652239523,-71.55384778976442],[-16.38782150268413,-71.55273735523225],[-16.388125246572464,-71.55201852321626],[-16.390235996106483,-71.54617667198183],[-16.391368583988857,-71.54312968254091],[-16.39225405720082,-71.54060840606691],[-16.392475424874792,-71.54023289680482],[-16.392624719210566,-71.54005587100984],[-16.393561667256666,-71.53929412364961],[-16.39376758929996,-71.53914391994478],[-16.393952918952806,-71.5390580892563],[-16.394241209173263,-71.53902053833009],[-16.395028857064155,-71.53922438621522],[-16.39533773772038,-71.5394175052643],[-16.39568780187178,-71.53978765010835],[-16.395826797757344,-71.53967499732973],[-16.395440697830207,-71.5393102169037],[-16.394992820955697,-71.53904199600221],[-16.393407225581335,-71.53870403766634],[-16.393062305397464,-71.538462638855],[-16.39269679229721,-71.53814613819124],[-16.392568090338045,-71.53782427310945],[-16.39258353457764,-71.53757750988008],[-16.392732828830553,-71.53724491596223],[-16.392949047890443,-71.53719663619997],[-16.39339692946527,-71.53737902641298],[-16.39444198246759,-71.537743806839],[-16.397505036544718,-71.53888106346132],[-16.398061014302893,-71.53936922550203],[-16.398441961109484,-71.53953015804292],[-16.399384029065402,-71.54007732868196],[-16.40049597226228,-71.54056549072267],[-16.401175489978176,-71.54044210910799],[-16.401649091831956,-71.54018998146059],[-16.402081509909486,-71.53988420963289],[-16.40241611847688,-71.53885424137117],[-16.403996492705385,-71.53941214084627],[-16.40497971579877,-71.5375989675522],[-16.405664365594966,-71.53568387031557],[-16.405844536193623,-71.53563022613527],[-16.405916604386373,-71.53537273406984],[-16.406832897653015,-71.53476119041444],[-16.4076204945969,-71.5340691804886],[-16.407744038926296,-71.53414428234102],[-16.407867583177254,-71.53408527374269],[-16.408850786711465,-71.53425157070161],[-16.40892800143832,-71.5341228246689],[-16.40941187969534,-71.53370440006258],[-16.410554651227198,-71.53274953365327],[-16.409833985277213,-71.53141379356386],[-16.409471663744732,-71.5304857492447],[-16.409337825239447,-71.53006732463838],[-16.409270905952273,-71.52976155281068],[-16.40920398664206,-71.5292251110077],[-16.408946604465207,-71.5280717611313],[-16.408689221947913,-71.52754068374635],[-16.408442134410947,-71.52732074260713],[-16.40796854908809,-71.52584016323091],[-16.407206692019585,-71.52469754219057],[-16.40705740886608,-71.52432739734651],[-16.406713460155657,-71.52345299720766],[-16.406656835381167,-71.52330815792085],[-16.405781831643353,-71.52217626571657],[-16.40507659126427,-71.520813703537],[-16.404566963414197,-71.52008950710298],[-16.403908048660227,-71.51912391185762],[-16.403537408130802,-71.51852309703828],[-16.40318735809377,-71.5181475877762],[-16.40286304646823,-71.51789009571077],[-16.402379151927086,-71.5174823999405],[-16.40237400410632,-71.51740729808809],[-16.40257991682956,-71.51703715324403],[-16.402940263570933,-71.51658654212953],[-16.40315647129558,-71.51640951633455],[-16.403141027894634,-71.51609301567079],[-16.404577258939558,-71.51393651962282],[-16.4065539897113,-71.51086807250978],[-16.41031178189958,-71.50507450103761],[-16.410497095800867,-71.50533199310304],[-16.41099641293405,-71.50624930858613],[-16.411861206586277,-71.50626540184022],[-16.411612292272796,-71.51223063468935],[-16.411596849542946,-71.51240766048433],[-16.41186967092292,-71.5126919746399],[-16.4124719356335,-71.51251494884492],[-16.412631509731487,-71.51295483112337],[-16.41241531253497,-71.51340007781984],[-16.415807521803654,-71.51538491249086],[-16.417938560795093,-71.51591062545778],[-16.420203407552446,-71.51659190654756],[-16.420610047699306,-71.51664018630983],[-16.421459356655077,-71.51646852493288],[-16.422519700810156,-71.51637196540834],[-16.42350797753358,-71.5159696340561],[-16.424346979350016,-71.51563167572023],[-16.424959499861405,-71.51536881923677],[-16.425690404164115,-71.51496648788454],[-16.426920581960076,-71.51799201965333],[-16.42691543478883,-71.51830852031709],[-16.427064702698534,-71.51844799518587],[-16.428994880858703,-71.5232276916504],[-16.429092676041826,-71.52359247207643],[-16.430297096892954,-71.53101682662965],[-16.430532923565615,-71.5326637029648],[-16.42715641273063,-71.53298556804658],[-16.42669831451516,-71.533060669899],[-16.425742182362654,-71.53305530548097],[-16.425376730652243,-71.53290510177614],[-16.425145105972963,-71.53310894966127],[-16.424753916998924,-71.53308212757112],[-16.424548027748994,-71.53298020362855],[-16.423045029617466,-71.5317463874817],[-16.42251485969565,-71.531440615654],[-16.421773648837387,-71.53123140335084],[-16.420574322504507,-71.53137087821962],[-16.418819071916193,-71.53192877769472],[-16.41793371956647,-71.53227746486665],[-16.417148973371017,-71.53265833854677],[-16.4164798063361,-71.53318941593172],[-16.41562018068924,-71.53389215469362],[-16.4142363225979,-71.5344822406769],[-16.41305753993059,-71.5349864959717],[-16.412434686815697,-71.5351313352585],[-16.412208194279426,-71.53508841991426],[-16.41204861983416,-71.53536200523378],[-16.410277849462148,-71.53609156608583],[-16.409490263275075,-71.53658509254457],[-16.408996089921963,-71.53737902641298],[-16.40824967987358,-71.53825879096986],[-16.40784301388357,-71.5384089946747],[-16.407523857701225,-71.53865039348604],[-16.406684783305202,-71.53938531875612],[-16.40570156882635,-71.54009342193605],[-16.40531034074113,-71.54079079627992],[-16.404919111869415,-71.54084444046022],[-16.40416753840917,-71.54049575328828],[-16.403807193939958,-71.54051184654237],[-16.40335933631261,-71.54039919376375],[-16.403071059593536,-71.54113411903383],[-16.40431167601005,-71.54249131679536],[-16.40421901613601,-71.54272735118867],[-16.404358005930504,-71.54295802116395],[-16.403486868916488,-71.54491603374483],[-16.403620711446074,-71.54528081417085],[-16.40382147506788,-71.54544174671175],[-16.404202410601542,-71.54567778110506],[-16.40433110487009,-71.54601573944093],[-16.404253888319147,-71.54621958732606],[-16.40485102884862,-71.54657900333406],[-16.404279627172848,-71.54787719249727],[-16.400377578095114,-71.54643952846529],[-16.400063557552247,-71.54640197753908],[-16.399672318134446,-71.54639124870302],[-16.39605846423592,-71.54494285583498],[-16.394637614419437,-71.54762506484987],[-16.39518330434329,-71.5482419729233],[-16.393618302730136,-71.54905200004579],[-16.39318936417917,-71.54910564422609],[-16.392113415905353,-71.54866576194765],[-16.3905895746874,-71.54792547225954],[-16.389581537178696,-71.54750704765321],[-16.38781571063862,-71.55257105827333],[-16.387646756824324,-71.55282855033876],[-16.386550184981093,-71.55379951000215],[-16.387188565584147,-71.55462026596071],[-16.39081288032548,-71.55257642269136],[-16.390890102207027,-71.55328989028932],[-16.39108058271733,-71.55360102653505],[-16.391451246960248,-71.5538799762726],[-16.391760133290507,-71.55408918857576],[-16.392022686286097,-71.55448079109193],[-16.392535872488203,-71.55619740486146],[-16.393570634004053,-71.55963063240053],[-16.392504984000226,-71.56057476997377],[-16.392613054069912,-71.56154036521913],[-16.392839569408842,-71.56196951866151],[-16.392957975049338,-71.56273663043977],[-16.392432871225804,-71.5626883506775],[-16.392247540126558,-71.56273663043977],[-16.39216517069249,-71.56311213970186],[-16.391887382014826,-71.56613230705263],[-16.392546323671986,-71.56613767147066],[-16.39260810062988,-71.56803131103517],[-16.390868042152054,-71.56736075878145],[-16.391218114337537,-71.56694769859315],[-16.395120346983237,-71.5683799982071],[-16.394898982315564,-71.56897008419038],[-16.394909278352216,-71.56937777996065],[-16.397133209506887,-71.56932413578035],[-16.399277542202935,-71.57083690166475],[-16.399730233300197,-71.57006978988649],[-16.39974052908139,-71.56911492347719],[-16.40310673460936,-71.56925439834596],[-16.403091291204507,-71.56837463378908],[-16.404162031040272,-71.56821906566621],[-16.40423812292294,-71.56966209411623],[-16.404454329205834,-71.57317578792573],[-16.40211208168194,-71.57284855842592],[-16.40209663819816,-71.57351911067964],[-16.401257540403016,-71.57346010208131],[-16.401087661268036,-71.5734761953354],[-16.400222819736875,-71.57394826412202],[-16.39848457410901,-71.57500505447389],[-16.394120398422363,-71.57564342021944],[-16.394053473903405,-71.57455444335939],[-16.38851925141572,-71.5749889612198],[-16.387865430560392,-71.5751338005066],[-16.38696964094413,-71.57501041889192],[-16.388786956959574,-71.57895863056184]] + } +] \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 7e9f71a..d89cd5f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,12 +2,14 @@ import "leaflet/dist/leaflet.css"; import { Index } from "./pages/Index"; import { Route, Router } from "@solidjs/router"; import { Editor } from "./pages/Editor"; +import { Index2 } from "./pages/Index2"; export default function() { return ( <> + diff --git a/src/new_types.ts b/src/new_types.ts new file mode 100644 index 0000000..c2e1962 --- /dev/null +++ b/src/new_types.ts @@ -0,0 +1,26 @@ + +export type Lines = Array + +export interface Line { + id: number + /** E.g.: `10` */ + name: string + /** Hex code */ + color: string +} + +export type Routes = Array + +export interface Route { + /** Name that differentiates this route from others + * from the same line. + * + * May contain any combinatior of letters and numbers. + * + * E.g.: `A`, `B2-A` + */ + name: string + /** `[lat,lng]`, stored as arrays to save space in JSON */ + points: Array<[number, number]> +} + diff --git a/src/pages/Editor.tsx b/src/pages/Editor.tsx index 4e325fd..a84c0fe 100644 --- a/src/pages/Editor.tsx +++ b/src/pages/Editor.tsx @@ -53,7 +53,7 @@ export function Editor() { }); const saveJson = () => { - const jsonData = JSON.stringify(points()); + const jsonData = JSON.stringify(points().map((obj) => [obj.lat,obj.lng])); const file = new Blob([jsonData], {type: "application/json"}); saveAs(file, "output.json"); }; @@ -99,7 +99,8 @@ export function Editor() {