leaflet-pegman icon indicating copy to clipboard operation
leaflet-pegman copied to clipboard

when dropping Pegman on invalid locations, Pegman does not reset to dock automatically.

Open Muskansa1n1 opened this issue 4 months ago • 1 comments

Issue When Pegman is dropped on an invalid Street View location →

  • Street View doesn’t load (which is fine ✅).
  • BUT Pegman remains in “active” state (floating on the map).
  • And you cannot dock it back unless you first drag it onto a valid location (which is a broken flow).

Expected If Pegman is dropped somewhere without coverage:

  • Street View should not load.
  • Pegman should automatically return to its dock (control position).
  • User shouldn’t be forced to drag it to a valid location before docking.

Muskansa1n1 avatar Aug 27 '25 13:08 Muskansa1n1

Hi Muskan,

when dropping Pegman on invalid locations, Pegman does not reset to dock automatically

Yes, that's the behavior, I don't think I'm gonna change it.

Once dropped, within your app, you can always try to access to the underneath "streetview" objects and change it (or monkey patch it) as you prefer, eg:

https://github.com/Raruto/leaflet-pegman/blob/f900acda3727977d1202f2f2747aa71d87c7fa70/leaflet-pegman.js#L354-L382

👋 Raruto

Raruto avatar Aug 27 '25 15:08 Raruto