Skip to content

Commit

Permalink
Add Layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Feb 15, 2024
1 parent a2ffce0 commit 87df55c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/web/src/components/CloudTAK/RadialMenu/RadialMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
style='pointer-events: none;'
:style='{
top: `${y - (size / 2)}px`,
left: `${x - (size / 2) - 5}px`,
left: `${x - (size / 2)}px`,
}'
></div>

Expand Down
17 changes: 8 additions & 9 deletions api/web/src/stores/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ export const useMapStore = defineStore('cloudtak', {
}

if (['vector', 'geojson'].includes(layer.type)) {
this.addLayer({
await this.addLayer({
id: layer.id,
url: layer.url,
save: true,
name: layer.name || layer.id,
mode: layer.id.split('-')[0],
mode_id: Number(layer.id.split('-')[1]),
mode: layer.mode || layer.id.split('-')[0],
mode_id: layer.mode_id || Number(layer.id.split('-')[1]),
overlay: layer.overlay || null,
source: layer.id,
type: layer.type,
Expand All @@ -261,7 +261,7 @@ export const useMapStore = defineStore('cloudtak', {
url: String(layer.url)
});

this.addLayer({
await this.addLayer({
id: layer.id,
url: layer.url,
save: true,
Expand All @@ -280,8 +280,8 @@ export const useMapStore = defineStore('cloudtak', {

}
},
initLayers: function(basemap) {
this.addLayer({
initLayers: async function(basemap) {
await this.addLayer({
name: basemap.name,
source: 'basemap',
type: 'raster',
Expand All @@ -293,7 +293,7 @@ export const useMapStore = defineStore('cloudtak', {
maxzoom: basemap.maxzoom
}]);

this.addLayer({
await this.addLayer({
name: 'CoT Icons',
source: 'cots',
type: 'vector',
Expand All @@ -308,7 +308,7 @@ export const useMapStore = defineStore('cloudtak', {
labels: true
}));

this.addLayer({
await this.addLayer({
name: 'Your Location',
source: 'you',
type: 'vector'
Expand Down Expand Up @@ -375,7 +375,6 @@ function cotStyles(id, opts = {
labels: false,
icons: false
}) {

const styles = [{
id: `${id}-poly`,
type: 'fill',
Expand Down

0 comments on commit 87df55c

Please sign in to comment.