Overview
Amazon serves millions of customers daily, often requiring them to locate physical points of interest, whether it's an Amazon Locker, a Whole Foods Market, or an Amazon Fresh store. Building intuitive tools for customers to find these locations is crucial for a seamless experience. This problem challenges you to develop a simplified interactive store locator map, focusing on displaying multiple store locations and providing details upon selection.
What you need to do / Task
Your primary goal is to build a React application that displays a map with multiple store locations marked on it. When a user clicks on a marker, the application should display the details of that specific store.
- Display a Map: Render a basic world or regional map using
react-simple-maps.
- Render Store Markers: For each store provided in the mock data, render a distinct marker on the map at its geographical coordinates.
- Handle Marker Selection: Implement click functionality for each marker. When a marker is clicked:
- The clicked marker should become visually highlighted.
- The details (name, address) of the selected store should be displayed in a dedicated panel next to the map.
- Update Selection: If a different marker is clicked, the previously selected marker should revert to its default state, and the new marker should be highlighted with its details displayed.
UI/UX expectations
- The map should be prominently displayed, occupying a significant portion of the screen.
- Store markers should be clearly visible and distinguishable. A simple circle or SVG icon is sufficient.
- When a marker is clicked, its appearance should change (e.g., color, size, or an outline) to indicate selection.
- Store details should appear in a dedicated, readable panel adjacent to the map (e.g., on the right or below).
- The overall layout should be clean and responsive enough for basic desktop viewing.
Acceptance criteria
- The application successfully renders a map.
- All mock
Store data points are represented by interactive markers on the map.
- Clicking any marker correctly updates the displayed store details panel with the corresponding store's information.
- The currently selected marker is visually distinct from unselected markers.
- Clicking a different marker deselects the previous one and highlights the newly clicked marker, updating the details panel accordingly.