Skip to content

Panorama - #1142

Open
wbazant wants to merge 2 commits into
mainfrom
issue-1081
Open

Panorama#1142
wbazant wants to merge 2 commits into
mainfrom
issue-1081

Conversation

@wbazant

@wbazant wbazant commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #1081
Closes #647.

Based on #1135 , credit to @sveder1 for starting this off!

@wbazant wbazant mentioned this pull request Jul 13, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploying falling-fruit-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: b71437d
Status: ✅  Deploy successful!
Preview URL: https://e7b70290.falling-fruit-web.pages.dev
Branch Preview URL: https://issue-1081.falling-fruit-web.pages.dev

View logs

@ezwelty

ezwelty commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@wbazant The website and API are back!

How come you opened a new PR rather than commit to the existing PR/branch? In order to trigger a Cloudflare Pages preview?

@wbazant

wbazant commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Didn't hugely think about it, just had all these crappy commits and had to put the branch online somewhere! But seeing the preview is a bonus - currently the labels don't go over the other markers on hover as a regression.

More great bugs: panorama on desktop doesn't let you click on locations, and the labels somehow come off when you move around. Also, clicking 'save' reloads it back to where it was first opened.

Show the same dot markers and fruit-name labels in the Street View
panorama as on the map, by extracting the map's marker/label rendering
into a shared module (locationMarkerHelpers.js) and reusing it. The
OverlayView labels attach to a StreetViewPanorama as well as a Map, so
both views render identically.

- All nearby locations get the map's dots (blue by default, orange when
  saved) plus their fruit-name label; labels use the satellite/hybrid
  style (white text, dark outline) since the panorama is imagery.
- The selected/viewed location additionally gets the orange "here" pin
  above its dot, using the same boxicons Map glyph as the map's MapPin.
- The map's own markers are hidden while Street View is open so they
  don't double up with the panorama's.
- Guard against async re-entrancy so a superseded panorama can't leave
  orphaned overlays on the shared panorama.

Closes #1081

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wbazant

wbazant commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

This is now more ready! I still need to translate verbiage and check on an actual phone.

Features:
- remove Google Street View link from location pages
- add the pegman control to the map (if zoomed in to level where locations are shown, and not editing position on mobile)
- use the same SVG markers between map and panorama: dot for location, pins for positions of selected location
- move the 'update position' mechanics to google maps event listeners: update on drop
- disallow submitting location form if position changed and street view is open and show a warning that street view positions are inaccurate
- clicking location dot selects it, now also in street view
- set only full screen street view on mobile, disallow full screen on desktop
- clicking the address link on location page moves the street view
- if opening street view and a location is selected, try to face the location from wherever the pegman was dropped (on actual mobile, this only works if 'move phone to move panorama' is disabled)
- apply 'show labels' settings in street view, interpreting 'when zoomed in' as a yes for street view
- when moving around street view, fetch locations when coming to the edge. Show labels only within a select radius
@wbazant

wbazant commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

@ezwelty Have a look!

Features:

  • remove Google Street View link from location pages
  • add the pegman control to the map (if zoomed in to level where locations are shown, and not editing position on mobile)
  • use the same SVG markers between map and panorama: dot for location, pins for positions of selected location
  • move the 'update position' mechanics to google maps event listeners: update on drop
  • disallow submitting location form if position changed and street view is open and show a warning that street view positions are inaccurate
  • clicking location dot selects it, now also in street view
  • set only full screen street view on mobile, disallow full screen on desktop
  • clicking the address link on location page moves the street view
  • if opening street view and a location is selected, try to face the location from wherever the pegman was dropped (on actual mobile, this only works if 'move phone to move panorama' is disabled)
  • apply 'show labels' settings in street view, interpreting 'when zoomed in' as a yes for street view
  • when moving around street view, fetch locations when coming to the edge of what's fetched. Show labels only within a select radius

@wbazant
wbazant marked this pull request as ready for review July 28, 2026 09:10
@ezwelty

ezwelty commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@sveder1 @wbazant Thanks for all this! I can see a lot of work went into this. Fun to play around with, especially on desktop where you have both street view and side pane in parallel and everything working together. Probably also fun in-situ on mobile surrounded by a tree inventory, but I'm not currently somewhere where I can test that.

  1. Seems like Street View was a beast to work with. Did you ever consider using the default map.getStreetView(), which supports overlays and automatically shares markers (https://developers.google.com/maps/documentation/javascript/streetview)? I used that for the old (admin-only) street view and remember it mostly working. Maybe a bit late but mentioning in case it can make life easier.
  2. I miss the Google Street View button on location page to quickly open Street View centered on the location (and quickly close Street View again). I think it would remain useful alongside the new controls.
  3. Why not show pegman control on mobile during edit-position? Currently Street View cannot be used on mobile to fine-tune / preview position.
  4. I like your implementation of them, but I have to wonder whether the position warning and blocker are too stringent. Street view georeferencing varies by region, but is probably never (?) worse than adding a location based on the low-detail Google roadmap. Which makes me wonder – should we show satellite basemap as default and drop the long "Check the satellite view..." text?
  5. I think it would be fine to make the "move phone to move panorama" feature off by default. I found it annoyingly jittery and preferred pressing the button (above the zoom controls) to disable the feature.

Quirks

  • Labels (from distant or dropped markers?) often end up in the top left corner of the window. For example here: https://issue-1081.falling-fruit-web.pages.dev/locations/3383/40.0405997,-105.2631823,19z (no way to link to a street view, correct?)
  • Closing Street View (after potentially wandering a long way) returns to an unchanged map. This is perhaps desirable, but this confused me after selecting a location, closing Street View, and no longer seeing the marker for the selected location.
  • Word wrap of labels as they approach the edge of the screen feels weird. Can it be disabled (to also match their map behavior)?
  • Clicking a location in mobile layout does not do anything. Open the drawer?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add labels to panorama (google street view) Add full access to Google Street View

3 participants