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

Freegle / iznik-nuxt3 / 25d6a21c-448d-49e1-8bd0-ff3cacea7985

17 Aug 2025 03:29PM UTC coverage: 41.088% (-0.7%) from 41.768%
25d6a21c-448d-49e1-8bd0-ff3cacea7985

push

circleci

edwh
Merge remote-tracking branch 'origin/modtools' into modtools

1881 of 5867 branches covered (32.06%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

157 existing lines in 10 files now uncovered.

4583 of 9865 relevant lines covered (46.46%)

124.15 hits per line

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

60.61
/composables/useMap.js
1
export function osmtile() {
3✔
2
  const runtimeConfig = useRuntimeConfig()
3✔
3
  return runtimeConfig.public.OSM_TILE
3✔
4
}
5

6
export function attribution() {
3✔
7
  return 'Map data &copy; <a href="https://www.openstreetmap.org/" rel="noopener noreferrer">OpenStreetMap</a> contributors'
3✔
8
}
9

UNCOV
10
export function toRadian(degree) {
×
UNCOV
11
  return (degree * Math.PI) / 180
×
12
}
13

UNCOV
14
export function getDistance(origin, destination) {
×
15
  // return distance in meters
UNCOV
16
  const lon1 = toRadian(origin[1])
×
UNCOV
17
  const lat1 = toRadian(origin[0])
×
UNCOV
18
  const lon2 = toRadian(destination[1])
×
UNCOV
19
  const lat2 = toRadian(destination[0])
×
20

UNCOV
21
  const deltaLat = lat2 - lat1
×
UNCOV
22
  const deltaLon = lon2 - lon1
×
23

UNCOV
24
  const a =
×
25
    Math.pow(Math.sin(deltaLat / 2), 2) +
26
    Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(deltaLon / 2), 2)
UNCOV
27
  const c = 2 * Math.asin(Math.sqrt(a))
×
UNCOV
28
  const EARTH_RADIUS = 6371
×
UNCOV
29
  return c * EARTH_RADIUS * 1000
×
30
}
31

32
export function calculateMapHeight(heightFraction) {
2✔
33
  let height = 0
2✔
34

35
  if (process.client) {
36
    height = window.innerHeight / heightFraction - 70
2✔
37
    height = height < 200 ? 200 : height
2✔
38
  }
39

40
  return height
2✔
41
}
42

43
export async function loadLeaflet() {
42✔
44
  if (process.client && !window.L) {
42✔
45
    // Rebuild the object to avoid "not extensible" issues when loading old-fashioned leaflet plugins.
46
    window.L = { ...(await import('leaflet/dist/leaflet-src.esm')) }
17✔
47
    window.L.Map.addInitHook(
17✔
48
      'addHandler',
49
      'gestureHandling',
50
      await import('leaflet-gesture-handling').GestureHandling
51
    )
52

53
    window.Wkt = await import('wicket')
17✔
54
    await import('wicket/wicket-leaflet')
17✔
55
  }
56
}
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