Skip to content

Add user location flow with map centering and temporary site creation #250

@wilhel1812

Description

@wilhel1812

Summary

Add a live user-position foundation that can center the map, show the current browser/device location, and let the user create an existing temporary Site draft from that position.

Desired behavior

  • User starts the flow from a map control labeled Use my location.
  • The browser/device location prompt is triggered by that explicit user action.
  • While active, the app watches the user position and keeps a visible user-position marker and accuracy circle on the map.
  • On the first successful location result after toggling on, the map centers on the returned location at zoom 12.
  • The map continues following location updates until the user manually pans; after that, the marker keeps updating without recentering. Toggle off/on re-enables following.
  • Clicking the user-position marker creates a temporary Site draft at the marker coordinates by reusing the existing temporary-site draft flow.
  • Initial toggle-on does not automatically create a temporary Site draft.
  • Saving the temporary Site uses the existing Save to Library flow and auto-inserts the saved Site into the current Simulation.
  • Dismissing the temporary Site removes only the draft; the user-position marker remains visible while location is active.
  • Turning location off stops live location, hides the marker/accuracy circle, and leaves any existing temporary Site draft alone.

Read-only behavior

  • In read-only/shared contexts, the location marker and accuracy circle still work.
  • Creating a temporary Site from the user-position marker is disabled in read-only contexts.

Out of scope

Acceptance criteria

  • The app can obtain user location from the browser/device after explicit user action.
  • The map recenters on the first successful returned location at zoom 12.
  • A live user-position marker and accuracy circle are shown while location is active.
  • User-position updates move the marker while active.
  • Manual map panning stops auto-follow without stopping marker updates.
  • Clicking the user-position marker in editable mode reuses the existing temporary Site draft flow with the marker coordinates.
  • Saving/dismising the temporary Site does not remove the user-position indicator while location is active.
  • Read-only mode shows marker/accuracy but does not create a temporary Site.
  • Location failures show plain app notifications; technical details are logged to console.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestin-stagingImplemented and verified in stagingmediumChanges needed at a fairly large scale, but with a narrower scope and lower risk than big.releasedIncluded in verified production release

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions