Bikemap

Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2025-06-02

Problem Statement

Source files: https://drive.google.com/file/d/1xQQvqYe77soO4LIbqjli3oGrY2OKqKEX/view?usp=drive_link

You need to send requests to their server, which will generate an image and store it locally. The server uses https://github.com/Luzifer/staticmap, but it might have been modified slightly. There are several parts in total:

•There's a JSON file in the repo containing many coordinates. You need to read it and print out the first 10 coordinates. These coordinates will be used later.
•Send an HTTP request to a specified URL. You'll receive an image of Stripe's map. The request is in JSON format and is already prepared. You just need to send it and save the response as an image.
•Send another HTTP request to the same URL, but this time you need to add some information to the request. What you're adding are the coordinates from the first question. Each coordinate will have specified color information and other details. After completing this, you'll receive an image that looks identical to the one from question 2, but with added paths from certain points to Stripe HQ. These path coordinates are the ones you added to your request.
•Add more fields, preprocess altitude to plot local max
•Calculate speed, plot different speeds in different colors


Solution

Comments