Skip to content

ImageService is jumpy on zoom/pan #1231

Open
@jfoster17

Description

@jfoster17

The ImageOverlay Layer in ipyleaflet is "jumpy" when zooming or panning around a map. Specifically, when you zoom or pan, the original overlay stays on the screen (in the same pixel position, which is now the wrong geographic position) for a little bit, before the new overlay is fetched from the remote server and displayed. Here is an image of what this looks like, and a screencapture as a video:

This recording was made by running the ImageService.ipynb notebook in the ipyleaflet/examples/ folder here but seems to be a generic feature of the ImageService layer (at least I can replicate this behavior with several different ImageService servers and very simple/straightforward examples).

Screenshot 2024-09-17 at 3 56 06 PM

ImageService_jumpy.mov

This makes the ImageService layer rather janky and confusing for end users. It would be nicer to either (1) remove the old overlay immediately when panning/zooming or (2) change it so that the old overlay stays displayed in the correct geographic location until the new image comes in from the ImageService. I have been unable to get either of these changes to work in the existing codebase -- any help or suggestions would be great!

Tagging @tsutterley who originally developed this very useful layer!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions