leaflet-pegman
leaflet-pegman copied to clipboard
when dropping Pegman on invalid locations, Pegman does not reset to dock automatically.
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.
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