• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / iznik-nuxt3 / 99e3f760-c611-4bfd-88c0-b43b43faaba6

05 Dec 2025 11:02PM UTC coverage: 42.545% (+0.4%) from 42.1%
99e3f760-c611-4bfd-88c0-b43b43faaba6

push

circleci

actions-user
Auto-merge production to app-ci-fd (daily scheduled)

Automated merge from production branch after successful tests.

🤖 Automated by GitHub Actions

1890 of 4798 branches covered (39.39%)

Branch coverage included in aggregate %.

1 of 3 new or added lines in 1 file covered. (33.33%)

305 existing lines in 20 files now uncovered.

2376 of 5229 relevant lines covered (45.44%)

31.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/components/MessageMap.vue
1
<template>
2
  <l-map
3
    ref="map"
4
    :zoom="12"
5
    :max-zoom="maxZoom"
6
    :style="'width: 100%; height: ' + height + 'px'"
7
    :options="mapOptions"
8
    @ready="idle"
9
  >
10
    <l-tile-layer :url="osmtile()" :attribution="attribution()" />
×
11
    <l-marker v-if="home" :lat-lng="home">
12
      <l-icon>
13
        <HomeIcon />
14
      </l-icon>
15
    </l-marker>
16
    <l-marker
17
      :lat-lng="[position.lat, position.lng]"
18
      :interactive="false"
19
      :icon="blurmarker"
20
    />
21
  </l-map>
22
</template>
23
<script setup>
24
import { computed, ref } from 'vue'
25
import HomeIcon from './HomeIcon'
26
import { MAX_MAP_ZOOM } from '~/constants'
27

UNCOV
28
const props = defineProps({
×
29
  home: {
30
    type: Object,
31
    required: false,
32
    default: null,
33
  },
34
  position: {
35
    type: Object,
36
    required: true,
37
  },
38
  locked: {
39
    type: Boolean,
40
    required: false,
41
    default: false,
42
  },
43
  boundary: {
44
    type: String,
45
    required: false,
46
    default: null,
47
  },
48
  maxZoom: {
49
    type: Number,
50
    required: false,
51
    default: MAX_MAP_ZOOM,
52
  },
53
  height: {
54
    type: Number,
55
    required: false,
56
    default: 200,
57
  },
58
})
59

UNCOV
60
const map = ref(null)
×
UNCOV
61
let L = null
×
62

63
if (process.client) {
UNCOV
64
  L = await import('leaflet/dist/leaflet-src.esm')
×
65
}
66

UNCOV
67
const mapOptions = computed(() => {
×
UNCOV
68
  return {
×
69
    // On mobile require two-finger interaction.
70
    dragging: !props.locked && (!L || !L.Browser.mobile),
×
71
    touchZoom: !props.locked,
72
    scrollWheelZoom: false,
73
    bounceAtZoomLimits: true,
74
  }
75
})
76

UNCOV
77
const blurmarker = computed(() => {
×
UNCOV
78
  return L
×
79
    ? new L.Icon({
80
        iconUrl: '/blurmarker.png',
81
        iconSize: [100, 100],
82
      })
83
    : null
84
})
85

UNCOV
86
function idle(themap) {
×
UNCOV
87
  if (props.home?.lat || props.home?.lng) {
×
88
    // We want to show both the centre and the marker.
89
    // eslint-disable-next-line new-cap
90
    const fg = new L.featureGroup([
×
91
      // eslint-disable-next-line new-cap
92
      new L.marker([props.position.lat, props.position.lng]),
93
      // eslint-disable-next-line new-cap
94
      new L.marker([props.home.lat, props.home.lng]),
95
    ])
96

97
    const fitTo = fg.getBounds().pad(0.1)
×
98
    if (fitTo.isValid()) {
×
99
      themap.fitBounds(fitTo)
×
100
    }
101
  } else {
102
    // eslint-disable-next-line new-cap
UNCOV
103
    const fg = new L.featureGroup([
×
104
      // eslint-disable-next-line new-cap
105
      new L.marker([props.position.lat, props.position.lng]),
106
    ])
107

UNCOV
108
    themap.fitBounds(fg.getBounds().pad(0.1))
×
UNCOV
109
    themap.setZoom(MAX_MAP_ZOOM)
×
110
  }
111

UNCOV
112
  try {
×
UNCOV
113
    console.log('Add map Zoom Control', map.value)
×
UNCOV
114
    const zoomControl = map.value.$el.querySelector('.leaflet-top.leaflet-left')
×
UNCOV
115
    if (zoomControl) {
×
UNCOV
116
      zoomControl.className = 'leaflet-top leaflet-right'
×
117
    }
118
  } catch (e) {
119
    console.log('Failed to add MessageMap zoom control', e)
×
120
  }
121
}
122
</script>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc