From 2b6f80e9c013456e0f6447fd84aa7e214b2b818a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Wed, 20 Mar 2024 15:51:55 +0100 Subject: [PATCH] Add more layers --- .gitignore | 3 ++- geojson/paesistici.geojson | 8 ++++++++ geojson/siti.geojson | 32 ++++++++++++++++++++++++++++++++ js/caprigis.js | 29 ++++++++++++++++++++++------- 4 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 geojson/paesistici.geojson create mode 100644 geojson/siti.geojson diff --git a/.gitignore b/.gitignore index c21ec6b..237e172 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ +*.qmd *.swp *.swo *.rar *.shp* *.log vendor/ -docs/ \ No newline at end of file +docs/ diff --git a/geojson/paesistici.geojson b/geojson/paesistici.geojson new file mode 100644 index 0000000..5d6a23f --- /dev/null +++ b/geojson/paesistici.geojson @@ -0,0 +1,8 @@ +{ +"type": "FeatureCollection", +"name": "paesistici", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, +"features": [ +{ "type": "Feature", "properties": { "id": 66, "COMUNE": "capri", "LOCALITA": "palazzo a mare villa", "FOGLIO": 2, "PARTICELLA": null, "ANNO": 1991, "PROPRIETA": "varie", "OGGETTO": "decreto con mappa vincoli paesistici" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 14.234203266070327, 40.557329493177171 ], [ 14.234091705192506, 40.557182612868182 ], [ 14.234091554887174, 40.557170098311801 ], [ 14.234018168901336, 40.556848504712399 ], [ 14.233048669681789, 40.557083626764992 ], [ 14.232528299419707, 40.557036372373489 ], [ 14.231857846305443, 40.55714989993244 ], [ 14.231895238844634, 40.557261876835291 ], [ 14.231814230308341, 40.557274745406211 ], [ 14.231644489837651, 40.557002340153403 ], [ 14.231461589278522, 40.557035311978822 ], [ 14.231399714895302, 40.557040263160083 ], [ 14.230826576508298, 40.557047173270504 ], [ 14.23059949577207, 40.557126104945482 ], [ 14.230680831773542, 40.557289323044209 ], [ 14.230503181321675, 40.557349813456035 ], [ 14.230277513608954, 40.557100719931171 ], [ 14.229808109400174, 40.557207977872245 ], [ 14.228268797334144, 40.557821592059469 ], [ 14.227971423972031, 40.558102053330614 ], [ 14.227871335738621, 40.558143393992147 ], [ 14.227888070874741, 40.558216799555836 ], [ 14.227313133639671, 40.558481101860124 ], [ 14.227409635433823, 40.55864978662877 ], [ 14.227051196035113, 40.55883866676497 ], [ 14.227265252054128, 40.559077856732785 ], [ 14.227607472260651, 40.55912751879233 ], [ 14.228142986211038, 40.55918383483273 ], [ 14.228150870808843, 40.559211596109812 ], [ 14.228314790130241, 40.559530893295445 ], [ 14.228349397282695, 40.559986975337459 ], [ 14.230246912584301, 40.560078295093916 ], [ 14.230301842338111, 40.55936927328753 ], [ 14.23029347989041, 40.559180840740161 ], [ 14.230526583120589, 40.559147971249018 ], [ 14.230604900694207, 40.559314672466179 ], [ 14.231690064418645, 40.559626691362396 ], [ 14.23181206360643, 40.559513987130941 ], [ 14.23190306970529, 40.559549451630659 ], [ 14.231984632747855, 40.559488320132878 ], [ 14.232304589760284, 40.559486872187804 ], [ 14.232678517621975, 40.559274839194607 ], [ 14.232713285222646, 40.559309035555962 ], [ 14.232889307829886, 40.5592887530998 ], [ 14.233261591676065, 40.559117823251015 ], [ 14.233540736217833, 40.559098224400671 ], [ 14.23389560424719, 40.559003741997891 ], [ 14.234218695457534, 40.55884172485743 ], [ 14.234415121311965, 40.55880340733583 ], [ 14.234673491061445, 40.558628433905277 ], [ 14.234668955065295, 40.558460811565631 ], [ 14.234914886189678, 40.558321663567234 ], [ 14.234855375914787, 40.558196133729055 ], [ 14.234999438616608, 40.558100554946726 ], [ 14.234995782880873, 40.557907017491502 ], [ 14.235125712435995, 40.557868996676326 ], [ 14.235157718063109, 40.557837030923586 ], [ 14.235244493333395, 40.557780847653788 ], [ 14.234998077202441, 40.557293868295929 ], [ 14.234726654574935, 40.557356425495314 ], [ 14.234605320967374, 40.557411485524426 ], [ 14.234570507932734, 40.557432706611479 ], [ 14.234527945305295, 40.557414101080795 ], [ 14.234484361097582, 40.557382304834313 ], [ 14.234418555268126, 40.557269470040367 ], [ 14.234354138493812, 40.55726613806263 ], [ 14.234253800600777, 40.557304130771811 ], [ 14.234203266070327, 40.557329493177171 ] ], [ [ 14.233803995584863, 40.557108997045333 ], [ 14.233945376759531, 40.557488321123365 ], [ 14.233944593819356, 40.557505596558109 ], [ 14.234017156556606, 40.557616763254472 ], [ 14.234027567106638, 40.557628749985255 ], [ 14.23413393400727, 40.55758041781278 ], [ 14.234270892256925, 40.557529584750938 ], [ 14.234329547721334, 40.557507181092568 ], [ 14.234391063054076, 40.557482338342972 ], [ 14.234477925216765, 40.557444256193101 ], [ 14.234496341647418, 40.557473576570445 ], [ 14.23456160694189, 40.55747959556988 ], [ 14.234588896789687, 40.557484394539657 ], [ 14.234650612629073, 40.557484803554111 ], [ 14.234765283965052, 40.557431635957826 ], [ 14.234900401125033, 40.557675502778125 ], [ 14.234749189104438, 40.557910098430227 ], [ 14.234698775285501, 40.558023429178711 ], [ 14.234570271017565, 40.558073451115639 ], [ 14.234601603930775, 40.558186280796001 ], [ 14.234623131640857, 40.558182550226398 ], [ 14.234630106915965, 40.558221775805436 ], [ 14.234639875727389, 40.558238674259719 ], [ 14.23464432547445, 40.558259559677552 ], [ 14.234468518850766, 40.558364014817066 ], [ 14.234326754888407, 40.558600534645727 ], [ 14.234152094886339, 40.55865568752715 ], [ 14.234122965310604, 40.55864089520292 ], [ 14.234064943813568, 40.558669945014685 ], [ 14.233780756786006, 40.558812623275152 ], [ 14.233665915997554, 40.558846124591078 ], [ 14.233496528125823, 40.558901311460168 ], [ 14.233204455007915, 40.558924250695043 ], [ 14.233006137241121, 40.558981330346228 ], [ 14.232750862787174, 40.559100003159735 ], [ 14.23266362615384, 40.55911074534712 ], [ 14.232643260414552, 40.559081113792566 ], [ 14.232212338995399, 40.559298205214418 ], [ 14.232124403870529, 40.559284585611223 ], [ 14.231967698411994, 40.559289502397796 ], [ 14.231868375008148, 40.55933234130972 ], [ 14.231816809602444, 40.55929818193443 ], [ 14.231737259355661, 40.559354112722907 ], [ 14.230808310158729, 40.559080377558395 ], [ 14.230728326535903, 40.55889266289811 ], [ 14.230723427651085, 40.558894045489303 ], [ 14.230463670048577, 40.558968960425688 ], [ 14.229986024891936, 40.559044284340366 ], [ 14.230008061657735, 40.55909843321021 ], [ 14.230027641586792, 40.559128357929069 ], [ 14.230048334434374, 40.559333852230665 ], [ 14.230012720553061, 40.55987631561996 ], [ 14.228641697917331, 40.559794468623195 ], [ 14.228595880392874, 40.559498008542015 ], [ 14.228475298768664, 40.559248719655812 ], [ 14.228547643092265, 40.559140156270068 ], [ 14.228574950750502, 40.559075387386365 ], [ 14.228642220153418, 40.558966492096161 ], [ 14.22832614571564, 40.558950429720149 ], [ 14.227432658726388, 40.558889709263966 ], [ 14.227419922638639, 40.558876216685228 ], [ 14.227712869516237, 40.558726449226548 ], [ 14.227641136135109, 40.558582175371143 ], [ 14.227650266679662, 40.558577990764398 ], [ 14.227639483648943, 40.558560265600754 ], [ 14.227641059575213, 40.558556980159658 ], [ 14.22813253698256, 40.558327424545311 ], [ 14.228125873394179, 40.558320899775062 ], [ 14.228111367681857, 40.558282926975629 ], [ 14.22811727818644, 40.558278497353285 ], [ 14.22811727818644, 40.558278497353285 ], [ 14.228234573305839, 40.558193027115301 ], [ 14.228392365118932, 40.558076319990704 ], [ 14.228515416034451, 40.557999826172704 ], [ 14.229353570447028, 40.557570799592895 ], [ 14.229353570447028, 40.557570799592895 ], [ 14.229353570447028, 40.557570799592895 ], [ 14.229353570447028, 40.557570799592895 ], [ 14.229492118573782, 40.55752234018054 ], [ 14.229653013913586, 40.557492353090169 ], [ 14.229767828156721, 40.557469655968497 ], [ 14.230146163940747, 40.557358439319003 ], [ 14.230189665801758, 40.557346104013277 ], [ 14.230217360745533, 40.557358131805181 ], [ 14.23024855159723, 40.557423030325495 ], [ 14.230356602047031, 40.557632682167089 ], [ 14.230393010412227, 40.557625774193468 ], [ 14.230593018397913, 40.557557388479893 ], [ 14.230761335705497, 40.557493260465428 ], [ 14.230789011597189, 40.557481378160681 ], [ 14.230942537575, 40.557429664918715 ], [ 14.23096226783206, 40.557420858049632 ], [ 14.230984891820817, 40.557415198835486 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230916394102925, 40.557265700779922 ], [ 14.230909016693625, 40.557249004149789 ], [ 14.230947039023837, 40.557241846049784 ], [ 14.231043695158476, 40.557239845424924 ], [ 14.231500486039728, 40.557227690952523 ], [ 14.231634208290075, 40.557524139024181 ], [ 14.23214890321786, 40.557367567488896 ], [ 14.232111932164425, 40.557287026341541 ], [ 14.23210855482183, 40.557253559911885 ], [ 14.232193192307809, 40.55724786586611 ], [ 14.232193192307809, 40.55724786586611 ], [ 14.232193192307809, 40.55724786586611 ], [ 14.232193192307809, 40.55724786586611 ], [ 14.232256658497683, 40.557244638008314 ], [ 14.23231398456891, 40.55724032650383 ], [ 14.232353495240627, 40.557235375155152 ], [ 14.232521136227557, 40.557230232562745 ], [ 14.232567016139637, 40.557231952674321 ], [ 14.232676515820833, 40.557255472816152 ], [ 14.232672927892258, 40.557270346070432 ], [ 14.232727290058214, 40.557264748415044 ], [ 14.232805485080364, 40.557258787661787 ], [ 14.232894138129884, 40.557252076981428 ], [ 14.233044007449731, 40.557246741098339 ], [ 14.233085140983928, 40.557227945979854 ], [ 14.233105649444068, 40.557227933196778 ], [ 14.233140904207525, 40.557219378014814 ], [ 14.233163143183194, 40.557221760247394 ], [ 14.233264815764169, 40.557238002769594 ], [ 14.233346363822585, 40.557246290635412 ], [ 14.233433823826145, 40.557232867928619 ], [ 14.233533591514551, 40.557184965581925 ], [ 14.233588870463894, 40.557201719245796 ], [ 14.233640221407287, 40.55720325178202 ], [ 14.233658534058607, 40.557190263858026 ], [ 14.233803995584863, 40.557108997045333 ] ] ] ] } } +] +} diff --git a/geojson/siti.geojson b/geojson/siti.geojson new file mode 100644 index 0000000..3dc7974 --- /dev/null +++ b/geojson/siti.geojson @@ -0,0 +1,32 @@ +{ +"type": "FeatureCollection", +"name": "siti", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, +"features": [ +{ "type": "Feature", "properties": { "Layer": "1", "PaperSpace": null, "SubClasses": null, "Linetype": null, "EntityHand": null, "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255510982332186, 40.549235083726821 ], [ 14.255488653309849, 40.549272340839408 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "463", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255708987991836, 40.549311248877281 ], [ 14.255631168506454, 40.549264776792882 ], [ 14.255635331027468, 40.54926072097922 ], [ 14.255607437590497, 40.549244063604718 ], [ 14.255607437590497, 40.549244063604718 ], [ 14.25560506706154, 40.549242747110455 ], [ 14.255602581917175, 40.549241559960151 ], [ 14.255599994264731, 40.549240507937476 ], [ 14.255597316711006, 40.549239596167787 ], [ 14.255594562300756, 40.549238829093113 ], [ 14.255591744453199, 40.549238210450596 ], [ 14.255588876896521, 40.549237743254139 ], [ 14.255585973601196, 40.549237429779879 ], [ 14.25558304871179, 40.549237271555072 ], [ 14.255580116478001, 40.549237269350549 ], [ 14.255577191185376, 40.549237423177047 ], [ 14.255574287085651, 40.549237732285135 ], [ 14.255571418327259, 40.549238195168897 ], [ 14.255568598886471, 40.549238809573176 ], [ 14.25556584249934, 40.549239572504703 ], [ 14.255563162594678, 40.54924048024651 ], [ 14.255560572228685, 40.549241528376236 ], [ 14.255558084021372, 40.549242711787429 ], [ 14.255555710094997, 40.549244024714696 ], [ 14.25555346201511, 40.549245460761568 ], [ 14.255551350734109, 40.549247012931765 ], [ 14.255549386537961, 40.549248673663307 ], [ 14.255547578996016, 40.549250434865264 ], [ 14.255545936914436, 40.549252287957259 ], [ 14.255544468293312, 40.549254223911227 ], [ 14.255543180287617, 40.549256233295345 ], [ 14.255542079172386, 40.549258306320191 ], [ 14.255541170312169, 40.549260432886136 ], [ 14.255540458134856, 40.549262602632801 ], [ 14.255539946110106, 40.549264804989392 ], [ 14.25553963673249, 40.549267029226243 ], [ 14.255539531509283, 40.549269264507096 ], [ 14.255539630953143, 40.549271499941909 ], [ 14.255539934579604, 40.54927372463986 ], [ 14.255540440909433, 40.549275927762437 ], [ 14.255541147475887, 40.549278098576217 ], [ 14.255542050836647, 40.549280226505282 ], [ 14.255543146590657, 40.549282301182529 ], [ 14.25554442939953, 40.549284312500305 ], [ 14.255545893013544, 40.549286250659719 ], [ 14.255547530302156, 40.549288106218185 ], [ 14.255549333288632, 40.549289870135667 ], [ 14.255551293189072, 40.549291533818533 ], [ 14.255553400454964, 40.549293089161388 ], [ 14.255555644819966, 40.549294528586834 ], [ 14.255583538264675, 40.549311185973764 ], [ 14.25558749441965, 40.549307331243043 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "464", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.25558749441965, 40.549307331243043 ], [ 14.255665313923252, 40.549353803356688 ], [ 14.255656477620489, 40.54936241313127 ], [ 14.25561537090053, 40.549337865105393 ], [ 14.255589752742631, 40.549362826482998 ], [ 14.255630859468212, 40.549387374517934 ], [ 14.255623503056553, 40.54939454233071 ], [ 14.255618030103978, 40.549391274005124 ], [ 14.255619929873589, 40.549389422940919 ], [ 14.255582340361805, 40.549366975305134 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbCircle:AcDbArc", "Linetype": null, "EntityHand": "465", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255631168506454, 40.549264776792882 ], [ 14.255629169564248, 40.549263666663585 ], [ 14.255627073972921, 40.549262665603173 ], [ 14.255624891942036, 40.549261778488791 ], [ 14.255622634102142, 40.549261009642322 ], [ 14.255620311453258, 40.549260362809477 ], [ 14.255617935311033, 40.549259841141598 ], [ 14.255615517251819, 40.549259447180177 ], [ 14.255613069056162, 40.549259182844544 ], [ 14.255610602651345, 40.549259049422552 ], [ 14.255608130053506, 40.549259047564192 ], [ 14.255605663308803, 40.549259177278508 ], [ 14.255603214435029, 40.549259437933529 ], [ 14.255600795362794, 40.549259828259444 ], [ 14.255598417877534, 40.549260346354558 ], [ 14.255596093562168, 40.549260989694787 ], [ 14.255593833740484, 40.549261755145864 ], [ 14.25559164942209, 40.549262638978576 ], [ 14.255589551248766, 40.549263636886941 ], [ 14.255587549442611, 40.549264744009328 ], [ 14.255585653756196, 40.549265954951913 ], [ 14.255583873425142, 40.549267263815146 ], [ 14.255582217122996, 40.549268664222332 ], [ 14.255580692919109, 40.549270149350839 ], [ 14.255579308239286, 40.549271711965339 ], [ 14.255578069829509, 40.549273344452864 ], [ 14.255576983723238, 40.549275038860145 ], [ 14.255576055211824, 40.549276786932161 ], [ 14.255575288818955, 40.549278580152532 ], [ 14.255574688278429, 40.549280409784878 ], [ 14.255574256515967, 40.549282266915334 ], [ 14.255573995635141, 40.549284142496234 ], [ 14.255573906906928, 40.549286027389911 ], [ 14.255573990763626, 40.549287912413376 ], [ 14.2555742467967, 40.54928978838295 ], [ 14.255574673758813, 40.549291646159112 ], [ 14.255575269569833, 40.549293476690949 ], [ 14.255576031327081, 40.549295271060309 ], [ 14.255576955319357, 40.549297020525174 ], [ 14.255578037045014, 40.549298716562369 ], [ 14.255579271234094, 40.549300350908908 ], [ 14.255580651873695, 40.549301915602456 ], [ 14.255582172237506, 40.549303403019998 ], [ 14.255583824918451, 40.549304805914915 ], [ 14.255585601864887, 40.549306117452488 ], [ 14.255587494419675, 40.549307331243043 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "468", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255553271516195, 40.549245793703022 ], [ 14.255537646220104, 40.549236462586393 ], [ 14.255529014616336, 40.549244872899749 ], [ 14.255544639913142, 40.549254204017586 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "46A", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255665313923252, 40.549353803356688 ], [ 14.255708987991836, 40.549311248877281 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "46B", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255612154243854, 40.549405600186013 ], [ 14.255623503056553, 40.54939454233071 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "46C", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255630859468212, 40.549387374517934 ], [ 14.255656477620489, 40.54936241313127 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "475", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255626762903121, 40.549413801479737 ], [ 14.255642466515718, 40.549420918560592 ], [ 14.255628954964768, 40.549438265652178 ], [ 14.255655671427178, 40.549450373892086 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "476", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255619698850236, 40.549414655164583 ], [ 14.255636202848397, 40.549422134991708 ], [ 14.255624073884746, 40.549437707016963 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "477", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255661569034332, 40.549429576064739 ], [ 14.255677249012757, 40.549436682426197 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "492", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255732210501879, 40.549318335400756 ], [ 14.255730968665066, 40.549319665259596 ], [ 14.255726576255109, 40.54931970832375 ], [ 14.255721664522175, 40.549318819011241 ], [ 14.255708987991836, 40.549311248877281 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "494", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255579366635697, 40.549397696885201 ], [ 14.25558060866403, 40.549398280807587 ], [ 14.255578427648501, 40.549400980157763 ], [ 14.255594888429158, 40.549408718963342 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "495", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255777716389304, 40.549330386550281 ], [ 14.255773217351303, 40.549340248566558 ], [ 14.255771371229278, 40.549340223394736 ], [ 14.255770352684273, 40.5493401809902 ], [ 14.255768164195892, 40.549339068244706 ], [ 14.255767030101234, 40.549338297499453 ], [ 14.255767080241764, 40.549337596781086 ], [ 14.255773695568259, 40.549323095803175 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4F7", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.2555771222281, 40.549273601797758 ], [ 14.255561668768879, 40.549264373307615 ], [ 14.255564584770951, 40.549261532062744 ], [ 14.255557983779878, 40.549257590084423 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4F8", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.25556198329668, 40.549253693102621 ], [ 14.2555685842876, 40.549257635080721 ], [ 14.255570300371119, 40.549255962991801 ], [ 14.255585753829628, 40.549265191480806 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4F9", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255506792588545, 40.549233622646895 ], [ 14.255510982332186, 40.549235083726821 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4FB", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255503362691531, 40.549235421258508 ], [ 14.255509497802308, 40.549237560742021 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4FC", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255501099485205, 40.549237626727624 ], [ 14.255508013272328, 40.549240037757258 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4FD", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255499366152469, 40.549240016978416 ], [ 14.255506528742247, 40.549242514772494 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4FE", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255496987489439, 40.549242182184564 ], [ 14.25550504421204, 40.54924499178766 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "4FF", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255529005163371, 40.549244867254664 ], [ 14.255537636767162, 40.549236456941273 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "500", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255531902253102, 40.549246597339632 ], [ 14.255540533856742, 40.549238187026042 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "501", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255534954987118, 40.549248420372095 ], [ 14.255543586590603, 40.549240010058298 ] ] ] } }, +{ "type": "Feature", "properties": { "Layer": "PLANIMETRIA", "PaperSpace": null, "SubClasses": "AcDbEntity:AcDbPolyline", "Linetype": null, "EntityHand": "503", "Text": null }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 14.255660841133986, 40.549358161481521 ], [ 14.255675977384023, 40.549367200507447 ], [ 14.255677835022935, 40.549365289006957 ], [ 14.255677859154034, 40.549363110333836 ], [ 14.255677990456517, 40.549361373495444 ], [ 14.255665313923252, 40.549353803356688 ] ] ] } } +] +} diff --git a/js/caprigis.js b/js/caprigis.js index f5369a7..a9552cb 100644 --- a/js/caprigis.js +++ b/js/caprigis.js @@ -13,14 +13,19 @@ const BASE_URL = location.href; * @returns {Map} */ GIS.initMap = async function (mapId, zoomLevel = 15) { + let layerSiti = await this.loadLayer('siti.geojson', '#800040'); let layerVincoli = await this.loadLayer('vincoli.geojson'); + // TODO named parameters?? + let layerPaesistici = await this.loadLayer('paesistici.geojson', '#222', '#ff8000'); let osmap = new L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxNativeZoom : 22, + maxZoom: 22, attribution: '© OpenStreetMap contributors' }); let map = L.map(mapId, { attributionControl: false, minZoom: 11, - layers: [osmap, layerVincoli] + layers: [osmap, layerVincoli, layerSiti, layerPaesistici] }).setView([40.5492, 14.2317], zoomLevel); map.crs = L.CRS.EPSG4326; @@ -28,11 +33,13 @@ GIS.initMap = async function (mapId, zoomLevel = 15) { const baseMap = { "Mappa di base (OpenStreetMap)" : osmap }; - const archeoConstraints = { - "Vincoli archeologici" : layerVincoli + const archeo = { + "Siti indagati" : layerSiti, + "Vincoli archeologici" : layerVincoli, + "Vincoli paesistici" : layerPaesistici, }; - let layerControl = L.control.layers(baseMap, archeoConstraints).addTo(map); + let layerControl = L.control.layers(baseMap, archeo).addTo(map); //DEBUG // Il sistema di riferimento per i livelli geoJSON è EPSG3857 @@ -42,7 +49,7 @@ GIS.initMap = async function (mapId, zoomLevel = 15) { * @param {string} geoJSON * @param {Map} map */ -GIS.loadLayer = async function (geoJSON, color = '#987db7') { +GIS.loadLayer = async function (geoJSON, color = '#222', fillColor = '#987db7') { const data = await fetch(`${BASE_URL}/geojson/${geoJSON}`) .then(res => res.json()) .catch(error => console.error(`Can't load layer ${geoJSON}. Reason: ${error}`)); @@ -54,10 +61,10 @@ GIS.loadLayer = async function (geoJSON, color = '#987db7') { const layer = new L.geoJson(data, { style: function (feature) { let style = { - color: '#222', + color: color, opacity: 0.8, weight: 1, - fillColor: color, + fillColor: fillColor, fillOpacity: 0.8 }; return style; @@ -87,6 +94,14 @@ GIS.featurePopup = function (layerName, feature) { Proprietà${feature.properties.PROPRIETA} `, + 'paesistici.geojson' : ` + + + + + +
Oggetto${feature.properties.OGGETTO}
Anno${feature.properties.ANNO}
Comune${feature.properties.COMUNE}
Proprietà${feature.properties.PROPRIETA}
+ `, }; return content[layerName];