Zoomable floor map

Hi,

I would like to create a zoomable and interactive floor plan in anvil. Please look at the gif below.
Has someone done anything like this before? Any help is appreciated :slight_smile:

Nov-11-2023 17-39-55

1 Like

You would be able to use the canvas to do something like that. Dragging, zooming, etc is all possible.

I added a panning part of the tutorial at: Canvas Tutorial

Zooming is built into the canvas itself, using the scale function.

2 Likes

Hi @tobias.carlbom,

I’m interested to hear what solution you eventually end up with for this.

Cheers,
Stein

i actually found a cdn which makes it possible to zoom and pan in a svg.
sadly i do not know how to get click events from certain areas of the svg but its a start.

would have been awesome if this “behaviour” was possible to add on like anvil XY panels :slight_smile:

please look at:

1 Like

You would definitely be able to do this with a Canvas component. I’ll have a look tomorrow and see if I’ve got any code that might help here

1 Like