1

This is my first question.

I'm wondering if there's a way to create a scroll indicator with an overview image on a website. Like if I had an oversized webpage and I wanted a window in the lower right corner showing my location as I scrolled through the x and y as a cutout of the entire page.

I'm not even sure if scroll indicator is the correct term. I don't need any percentages or show of how close the scroll is to the end, I want to make an interactive display of what the user would be seeing on their screen as a piece of the overall map of the page.

Thank you for any help!

Edit: sketch

  • can u draw a simple sketch what u intend to do? – m4ngl3r Apr 14 '21 at 07:18
  • @m4ngl3r just added a sketch. The little window would show what you see on your screen in relation to the rest of the much larger page – Benjamin Blumenstein Apr 15 '21 at 23:19
  • 1
    start with a simple example, let's say u have a 'world' with a dimension 100x100 px; and ur window sees 20x20 square of that world and ur map sees same 20x20 window but in a small scale, like 5x5 - 4 times smaller; capture positions of ur element relative to the window https://stackoverflow.com/questions/442404/retrieve-the-position-x-y-of-an-html-element-relative-to-the-browser-window – m4ngl3r Apr 16 '21 at 07:00

0 Answers0