Skip to content

Commit

Permalink
Add building background
Browse files Browse the repository at this point in the history
  • Loading branch information
AmiyaSX committed Oct 10, 2024
1 parent 8452abd commit 0f951a3
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 743 deletions.
8 changes: 5 additions & 3 deletions src/app/student/map/_components/MapComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BoothPopup } from "@/app/student/map/_components/BoothPopup"
import {
BoothID,
geoJsonBoothDataByLocation
geoJsonBoothDataByLocation,
geoJsonBuildingData
} from "@/app/student/map/lib/booths"
import { Location } from "@/app/student/map/lib/locations"
import "maplibre-gl/dist/maplibre-gl.css"
Expand All @@ -17,6 +18,7 @@ import { BoothMap, GeoJsonBooth } from "../lib/booths"
import {
backgroundLayerStyle,
boothLayerStyle,
buildingLayerStyle,
geoJsonNymblePlan2Data,
geoJsonNymblePlan2RoutesData,
nymblePlan2LineLayerStyle,
Expand Down Expand Up @@ -174,13 +176,13 @@ export function MapComponent({
<Layer {...boothLayerStyle}></Layer>
</Source>

{/* <Source
<Source
id="buildings"
type="geojson"
promoteId={"id"}
data={geoJsonBuildingData}>
<Layer {...buildingLayerStyle}></Layer>
</Source> */}
</Source>

<Source
id="nymble-plan2-style"
Expand Down
141 changes: 72 additions & 69 deletions src/app/student/map/data/buildings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,91 @@
"type": "FeatureCollection",
"features": [
{
"id": "nymble",
"type": "Feature",
"properties": {
"id": 1,
"location": "nymble/1",
"exhibitorId": -1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[18.06971462098832, 59.347364656309395],
[18.069894289003997, 59.34745992686692],
[18.069987039221786, 59.3474156134931],
[18.070030460145233, 59.34743875061068],
[18.07020534557526, 59.34737707459962],
[18.07033227539216, 59.34745951937535],
[18.070231692554188, 59.34749541549576],
[18.070460687570687, 59.3476588360075],
[18.070613957741045, 59.34760146636043],
[18.070575600270928, 59.34757415173681],
[18.07094204280932, 59.34737346884842],
[18.071054025036204, 59.34741004879683],
[18.071128124413036, 59.34734435464833],
[18.0710932556959, 59.34733238922587],
[18.071310353363742, 59.347069755137596],
[18.071193006718772, 59.347042747244984],
[18.07107431896935, 59.34718667513246],
[18.07095093735478, 59.347159325462144],
[18.07098379441581, 59.34712650582867],
[18.07067601093098, 59.3470683876499],
[18.070748798530218, 59.34696624213629],
[18.07078702000925, 59.34698812199872],
[18.07083529977146, 59.34696453277144],
[18.070805795472353, 59.346948122864546],
[18.07085541633907, 59.34691667052047],
[18.070747457425682, 59.34686812445446],
[18.069966796803726, 59.3472763603672],
[18.06992730897153, 59.34725488600304],
[18.06971462098832, 59.347364656309395]
[18.0697146209883, 59.3473646563094],
[18.069894289004, 59.3474599268669],
[18.0699870392218, 59.3474156134931],
[18.0700304601452, 59.3474387506107],
[18.0702053455753, 59.3473770745996],
[18.0703322753922, 59.3474595193754],
[18.0702316925542, 59.3474954154958],
[18.0704606875707, 59.3476588360075],
[18.070613957741, 59.3476014663604],
[18.0705756002709, 59.3475741517368],
[18.0709420428093, 59.3473734688484],
[18.0710540250362, 59.3474100487968],
[18.071128124413, 59.3473443546483],
[18.0713157587403, 59.347135634353],
[18.0713340409054, 59.3471418796446],
[18.0713891817805, 59.3470698234946],
[18.0713252326803, 59.3470541254728],
[18.0713103533637, 59.3470697551376],
[18.0711930067188, 59.347042747245],
[18.0710743189694, 59.3471866751325],
[18.0709509373548, 59.3471593254621],
[18.0709837944158, 59.3471265058287],
[18.070676010931, 59.3470683876499],
[18.0707487985302, 59.3469662421363],
[18.0707870200093, 59.3469881219987],
[18.0708352997715, 59.3469645327714],
[18.0708057954724, 59.3469481228645],
[18.0708554163391, 59.3469166705205],
[18.0707474574257, 59.3468681244545],
[18.0699667968037, 59.3472763603672],
[18.0699273089715, 59.347254886003],
[18.0697146209883, 59.3473646563094]
]
],
"type": "Polygon"
]
},
"id": "0f1fbe55-ac4a-497f-a37a-f356b83a3ca4",
"properties": {
"id": 1,
"location": "nymble/1",
"exhibitorId": -1
}
},
{
"id": 2,
"type": "Feature",
"properties": {
"id": 2,
"location": "nymble/1",
"exhibitorId": -1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[18.07120957474774, 59.348079085235696],
[18.071290395870818, 59.34794277621802],
[18.07095293780756, 59.34788991708149],
[18.070757395490403, 59.34821375590255],
[18.071095469388524, 59.348267118449854],
[18.071128558666715, 59.34821604061807],
[18.07119713894781, 59.34820760584307],
[18.0712144943881, 59.34824530425803],
[18.07161481408383, 59.348181034500556],
[18.0716322484424, 59.34821658799845],
[18.07282548715935, 59.34822584712978],
[18.072838227651516, 59.348252170361576],
[18.07313227489297, 59.34820751546644],
[18.073117522744695, 59.348164099159135],
[18.073259009269435, 59.34813504096962],
[18.07273041213182, 59.34752166893173],
[18.072507118230902, 59.347573290866336],
[18.072491024976813, 59.347549360177766],
[18.07232942188449, 59.347588674871304],
[18.072381724960195, 59.347654313214235],
[18.071626186978165, 59.34792091272823],
[18.07167531500258, 59.347955687936064],
[18.071444355183218, 59.34804026818318],
[18.07120957474774, 59.348079085235696]
[18.0712095747477, 59.3480790852357],
[18.0712903958708, 59.347942776218],
[18.0709529378076, 59.3478899170815],
[18.0707573954904, 59.3482137559026],
[18.0710954693885, 59.3482671184499],
[18.0711285586667, 59.3482160406181],
[18.0711971389478, 59.3482076058431],
[18.0712144943881, 59.348245304258],
[18.0716148140838, 59.3481810345006],
[18.0716322484424, 59.3482165879985],
[18.0728254871594, 59.3482258471298],
[18.0728382276515, 59.3482521703616],
[18.073132274893, 59.3482075154664],
[18.0731175227447, 59.3481640991591],
[18.0732590092694, 59.3481350409696],
[18.0727304121318, 59.3475216689317],
[18.0725071182309, 59.3475732908663],
[18.0724910249768, 59.3475493601778],
[18.0723294218845, 59.3475886748713],
[18.0723817249602, 59.3476543132142],
[18.0716261869782, 59.3479209127282],
[18.0716753150026, 59.3479556879361],
[18.0714443551832, 59.3480402681832],
[18.0712095747477, 59.3480790852357]
]
],
"type": "Polygon"
]
},
"id": "018b7d37-760e-4817-b1d0-0c0148f30daa",
"properties": {
"id": 2,
"location": "nymble/1",
"exhibitorId": -1
}
}
]
Expand Down
Loading

0 comments on commit 0f951a3

Please sign in to comment.