Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 2.19 KB

Approach.md

File metadata and controls

41 lines (32 loc) · 2.19 KB

This document outlines the technical approach used in the EnviroCar Track Visualizer with MapLibre challenge app.

Objective:

  • Develop an Android application that visualizes a recorded enviroCar track on a MapLibre map.

Approach:

Data Fetching (Simulated):

  • Utilize a placeholder API call to simulate fetching a pre-defined JSON string representing a recorded enviroCar track.
  • This JSON data would typically contain GPS coordinates and timestamps in a real-world scenario.
  • Parse the JSON data to extract relevant information like latitude, longitude, and timestamps (if applicable).

Map Integration:

  • Leverage the MapLibre Native library for Android to display a map.
  • Set the map style to OpenStreetMap (OSM) to provide a familiar base map.

Track Visualization:

  • Utilize the MapLibre API to create a Polyline object from the extracted list of GPS coordinates.
  • Add the Polyline object to the map, effectively visualizing the track path.

Markers:

  • Create markers for the origin and destination points of the track using the MapLibre API.
  • Customize marker icons (optional) to visually distinguish them.

Popups (Basic):

  • Implement a basic on-click listener for the track point markers.
  • When a marker is clicked, display a simple message (placeholder functionality).

Technical Considerations:

  • This approach prioritizes simplicity and demonstration of core functionalities.
  • In a real-world scenario, the app would need to:
  • Implement actual enviroCar API calls for secure and authenticated data retrieval.
  • Handle potential errors or network issues during the data fetching process.

Further Enhancements:

Integrate the actual enviroCar API for track data retrieval.

  • Develop a more comprehensive popup functionality that displays the timestamp of the clicked track point.
  • Implement user location tracking and display it on the map (with appropriate permissions).
  • Add map controls (zoom, pan) to enhance user interaction.
  • Explore customization options for map styles and marker icons.
  • By following this approach, the EnviroCar Track Visualizer demonstrates the feasibility of migrating map functionalities from Mapbox to MapLibre while showcasing core visualization capabilities.