-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
316 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.poetry] | ||
name = "ocb-backend" | ||
name = "avicable-backend" | ||
version = "0.0.1" | ||
description = "overhead cables and birdlife - backend" | ||
authors = ["LPO AuRA <[email protected]>"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "aviCable-frontend", | ||
"name": "avicable-frontend", | ||
"version": "0.0.1", | ||
"description": "Overhead cables and birdlife - frontend", | ||
"author": "LPO AuRA <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<template> | ||
<v-container fill-height fluid> | ||
<l-map :zoom="zoom" :center="center" style="height: 500px; width: 100%"> | ||
<l-tile-layer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" :attribution="attribution" /> | ||
<l-geo-json ref="layer0" :geojson="geoJsonLayers[0]" :options="geoJsonOptions" @add="bringToFront()" /> | ||
<l-geo-json ref="layer1" :geojson="geoJsonLayers[1]" :options="geoJsonOptions" @add="bringToFront()" /> | ||
<l-geo-json ref="layer2" :geojson="geoJsonLayers[2]" :options="geoJsonOptions" @add="bringToFront()" /> | ||
</l-map> | ||
</v-container> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from 'vue'; | ||
import { LMap, LTileLayer, LGeoJson } from "@vue-leaflet/vue-leaflet"; | ||
import 'leaflet/dist/leaflet.css'; | ||
// Map center and zoom level | ||
const layer1 = ref() | ||
const center = ref([51.505, -0.09]); // Common location | ||
const zoom = ref(13); | ||
const attribution = ref('© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors') | ||
// GeoJSON data for three layers | ||
const geoJsonLayers = ref([ | ||
{ | ||
type: 'FeatureCollection', | ||
features: [ | ||
{ | ||
type: 'Feature', | ||
properties: { name: 'Point A 1', color: 'red', size:3}, | ||
geometry: { | ||
type: 'Point', | ||
coordinates: [-0.09, 51.505], // Point 1 | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'FeatureCollection', | ||
features: [ | ||
{ | ||
type: 'Feature', | ||
properties: { name: 'Point B 2', color: 'green', size:5 }, | ||
geometry: { | ||
type: 'Point', | ||
coordinates: [-0.08, 51.506], // Point 2 | ||
}, | ||
}, | ||
{ | ||
type: 'Feature', | ||
properties: { name: 'Point B 1', color: 'green', size:5 }, | ||
geometry: { | ||
type: 'Point', | ||
coordinates: [-0.09, 51.505], // Point 1 | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'FeatureCollection', | ||
features: [ | ||
{ | ||
type: 'Feature', | ||
properties: { name: 'Point C 3', color: 'blue', size:10 }, | ||
geometry: { | ||
type: 'Point', | ||
coordinates: [-0.07, 51.507], // Point 3 | ||
}, | ||
}, | ||
{ | ||
type: 'Feature', | ||
properties: { name: 'Point C 2', color: 'blue', size:10 }, | ||
geometry: { | ||
type: 'Point', | ||
coordinates: [-0.08, 51.506], // Point 2 | ||
}, | ||
}, | ||
], | ||
}, | ||
]); | ||
const bringToFront = () => { | ||
layer1.value?.leafletObject?.bringToFront() | ||
console.log(layer1.value?.leafletObject?.bringToFront()) | ||
} | ||
// CircleMarker options | ||
const geoJsonOptions = { | ||
pointToLayer: (feature, latlng) => { | ||
console.log('feature', feature ) | ||
return L.circleMarker(latlng, { | ||
radius: feature.properties.size, | ||
fillColor: feature.properties.color, | ||
color: '#000', | ||
weight: 1, | ||
opacity: 1, | ||
fillOpacity: 0.8, | ||
}); | ||
}, | ||
}; | ||
</script> | ||
<style scoped> | ||
/* Add any additional styles here */ | ||
</style> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.