Skip to content

Dive Route Annotations and Points of Interest #57

Description

@kargig

Overview

Implement annotation system for dive routes allowing users to mark specific points with comments and icons indicating points of interest such as caverns, big rocks, ship wrecks, car wrecks, airplane wrecks, and other underwater features.

Tasks

Core Annotations & Map System (100% Completed)

  • Design annotation interface for adding points of interest to dive routes
  • Implement point marking system on dive route maps
  • Create icon library for common underwater features (caverns, wrecks, rocks, etc.)
  • Add text comment functionality for each annotation point
  • Implement annotation storage and retrieval from database
  • Create annotation editing and deletion capabilities
  • Ensure mobile compatibility for annotation creation and viewing
  • Create annotation display on dive site and dive details pages

Advanced Features & Discovery (100% Completed)

  • Add annotation filtering and search by feature type (Exposed via Feature Pills in DiveRoutes page)

Declared Superfluous / Out of Scope (Skipped)

  • Implement annotation sharing and community features (Declined: Low ROI. Route-level likes and sharing already exist; annotating/sharing child elements introduces high schema complexity for minimal UX gain)
  • Add annotation validation and quality checks (Completed: Global XSS input sanitization and Pydantic GeoJSON shape validators are active)
  • Test annotation system performance with multiple points (Declined: Marker clustering is active on global maps but unnecessary for single-route maps, where it degrades sequential UX)

Data Portability & Integration (In Progress)

  • Implement annotation export functionality (Completed: GPX/KML waypoint export is fully integrated in RouteExportService)
  • Implement GPX & KML Route and POI Import functionality (Pending: Most important next step!)

Priority

Medium

Status

In Progress

Related Files

docs/development/dive-route-annotations-implementation.md

Activity

  1. kargig commented on Mar 20, 2026

    @kargig
    OwnerAuthor

    I have reviewed the codebase to determine the status of the requested features for "Dive Route Annotations and Points of Interest."

    Here is the breakdown of what has been implemented and what is still pending:

    ✅ Implemented Features

    • Point Marking System: The core ability to place Points of Interest (POIs) is implemented. These markers are stored as GeoJSON Point features within the route_data column of the DiveRoute model.
    • Icon Library: A comprehensive set of specialized underwater icons has been built (found in frontend/src/utils/markerTypes.js). It includes categories like:
      • Wreck (Red Anchor)
      • Cave/Cavern (Purple Warehouse)
      • Rock (Gray Hexagon), Coral (Pink Flower), Wall/Drop-off (Brown Square)
      • Marine Life, Ancient Artifacts, Hazards, and Canyon/Swim Throughs.
    • Text Annotations: Implemented. Users can attach custom text comment and media URLs to any marked point. These are rendered contextually inside map popups (handled in RouteDetail.jsx).
    • Management Tools (CRUD): Fully functional. The map editor interface (RouteCanvas.jsx) allows users to create, read, update, and delete markers interactively while editing a route.
    • Contextual Display: Points of Interest render seamlessly inside the map layer of the Dive Route details page.
    • Cross-Platform Support: The Leaflet map implementation for routing and annotations uses responsive React components, naturally supporting mobile viewing and creation.
    • Data Portability (Export): The backend RouteExportService correctly parses Point geometries and converts them to <wpt> (waypoints) when exporting to GPX, and <Point> when exporting to KML.

    ⏳ Pending Features

    • Discovery & Organization: There is currently no search or filtering functionality to help users discover dive routes based on specific annotations (e.g., searching specifically for "routes that feature a wreck" or "routes with cavern POIs").
    • Social Sharing (Annotation-Specific): While users can share entire Dive Routes, there are no specific community-driven features to share or upvote individual annotations independently of the route.
    • Data Portability (Import): Although exporting POIs via GPX/KML is supported, there's no endpoint or UI feature to import standalone POIs/waypoints from external files into a dive route.
    • Quality Control: The backend stores the annotations as arbitrary GeoJSON properties. There are currently no explicit validation rules, length constraints, or quality checks specifically applied to user-submitted annotation comments.
    • Performance Optimization (Marker Clustering): The codebase implements leaflet.markercluster on large maps (like DivesMap.jsx and DivingCentersMap.jsx), but this clustering optimization has not yet been applied to the RouteDetail.jsx or RouteCanvas.jsx maps. Rendering too many annotations on a single dive route may cause sluggishness.
  2. kargig commented on Jul 12, 2026

    @kargig
    OwnerAuthor

    Hello! I have conducted a comprehensive review of the codebase against the requested tasks in this issue and updated the issue description to reflect the current status:

    ✅ Already Implemented

    • Core Annotation & CRUD System: Complete. Users can draw lines, place POI markers, and CRUD annotations inside the route editor (RouteCanvas.jsx), which render dynamically in RouteDetail.jsx.
    • Advanced Filtering & Discovery: Complete. The frontend UI in DiveRoutes.jsx already features interactive POI marker filtering pills mapping to backend json_contains SQL queries on the route_data column.
    • Portability (Export): Complete. RouteExportService fully supports GPX and KML waypoint/POI export.

    🚫 Declared Superfluous / Out of Scope (Skipped)

    • Individual Annotation Sharing: Route-level sharing and bookmarks are fully functional. Splitting child GeoJSON points into custom tables to support individual likes has a low ROI.
    • Marker Clustering: Single route maps rarely exceed 10 POIs. Clustering them would merge sequential points on zoom, hurting navigation readability.
    • Validation: Pydantic validators in schemas/__init__.py already enforce GeoJSON integrity, and all text inputs are sanitized globally for XSS.

    ⏳ The Interesting Pending Task

    • Data Portability (Import): GPX & KML Route and POI Import is the single major functional gap remaining. This will allow users to import tracks and waypoints from GPX/KML files directly into the map editor.

    We are ready to begin the design and implementation of the GPX/KML Import feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions