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

Problematy / goodmap / 28131466663

24 Jun 2026 09:41PM UTC coverage: 74.158%. First build
28131466663

Pull #365

github

web-flow
Merge 6f4f8c15d into 27cbf5bb0
Pull Request #365: refactor!: aligned with breaking changes on platzky

174 of 277 branches covered (62.82%)

Branch coverage included in aggregate %.

575 of 733 new or added lines in 26 files covered. (78.44%)

575 of 733 relevant lines covered (78.44%)

8.77 hits per line

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

14.29
/frontend/src/components/Map/components/MapAutocomplete.jsx
1
import React from 'react';
2
import styled from 'styled-components';
3
import { useMap } from 'react-leaflet';
4
import Autocomplete from '../../common/Autocomplete';
5

6
/**
7
 * Map autocomplete search component that allows users to search for locations.
8
 * When a location is selected, the map flies to that location with zoom level 13.
9
 * Positioned in the top-left corner of the map with responsive width.
10
 *
11
 * @returns {React.ReactElement} Autocomplete component wrapped in a positioned container
12
 */
13
const MapAutocomplete = () => {
1✔
NEW
14
    const map = useMap();
×
15

NEW
16
    const onPick = pick => {
×
NEW
17
        if (!pick || typeof pick.lat !== 'number' || typeof pick.lon !== 'number') {
×
NEW
18
            console.warn('Invalid pick coordinates:', pick);
×
NEW
19
            return;
×
20
        }
NEW
21
        map.flyTo([pick.lat, pick.lon], 13);
×
22
    };
23

NEW
24
    return (
×
25
        <Wrapper>
26
            <Autocomplete onClick={onPick} />
27
        </Wrapper>
28
    );
29
};
30

31
/**
32
 * Styled wrapper container for the autocomplete component.
33
 * Positioned absolutely in the top-left corner with responsive width.
34
 * Ensures autocomplete appears above map controls with high z-index.
35
 */
36
const Wrapper = styled.div`
1✔
37
    position: absolute;
38
    width: 300px;
39
    top: 10px;
40
    left: 10px;
41
    z-index: 9999999;
42
    @media only screen and (max-width: 768px) {
43
        width: 200px;
44
    }
45
`;
46

47
export default MapAutocomplete;
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