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

gcivil-nyu-org / team4-wed-spring25 / 415

09 Apr 2025 09:44PM UTC coverage: 96.016% (-1.3%) from 97.348%
415

Pull #223

travis-pro

web-flow
Merge 641d3dcfc into 81c89d2d6
Pull Request #223: Fixing URLS

964 of 1004 relevant lines covered (96.02%)

0.96 hits per line

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

50.0
/parks/utilities.py
1
# Place to write general purpose functions
2

3

4
# Helper function to style folium clusters
5
# returns a JavaScript function as String
6
def folium_cluster_styling(color):
1✔
7
    return f"""
×
8
        function(cluster) {{
9
            var childCount = cluster.getChildCount();
10
            var color = "{color}";
11
            var size;
12

13
            if (childCount < 10) {{
14
                size = 25;
15
            }} else if (childCount < 25) {{
16
                size = 40;
17
            }} else if (childCount < 50) {{
18
                size = 60;
19
            }} else {{
20
                size = 80;
21
            }}
22

23
            var outerSize = size * 1.2;  // Slightly larger for outer effect
24

25
            return new L.DivIcon({{
26
                html: '<div style="position: relative; width:' + outerSize +
27
                          'px; height:' + outerSize + 'px;">' +
28
                          // Outer translucent circle
29
                          '<div style="position: absolute; top: 50%; left: 50%;' +
30
                                      'transform: translate(-50%, -50%);' +
31
                                      'width:' + outerSize + 'px;' +
32
                                      'height:' + outerSize + 'px;' +
33
                                      'border-radius: 50%;' +
34
                                      'background-color:' + color + ';' +
35
                                      'opacity: 0.3;"></div>' +
36
                          // Inner solid circle
37
                          '<div style="position: absolute; top: 50%; left: 50%;' +
38
                                      'transform: translate(-50%, -50%);' +
39
                                      'width:' + size + 'px;' +
40
                                      'height:' + size + 'px;' +
41
                                      'border-radius: 50%;' +
42
                                      'background-color:' + color + ';' +
43
                                      'display: flex; justify-content: center;' +
44
                                      'align-items: center;' +
45
                                      'font-weight: bold;' +
46
                                      'color: white;' +
47
                                      'text-shadow: -1px -1px 0 black, 1px -1px 0' +
48
                                      'black, ' +
49
                                      '-1px 1px 0 black, 1px 1px 0 black;">' +
50
                                      '<span style="font-size: 14px;">' + childCount +
51
                                      '</span></div>' +
52
                      '</div>',
53
                className: "marker-cluster",
54
                iconSize: new L.Point(outerSize, outerSize),
55
                iconAnchor: new L.Point(outerSize / 2, outerSize / 2)
56
            }});
57
        }}
58
    """
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