Harm weighs the usual advice to reuse existing libraries against the needs of a specific component. Their first version used a pan and zoom image viewer adapted from a React Native Reanimated example. They needed access to the viewport position so users could place a marker precisely beneath a fixed center point.
Building a full JS deep zoom image viewer
Speaker
Maxence Harm, co-founder of a SaaS company for construction professionals, presents at React Native EU 2022 with Callstack about building a deep zoom blueprint viewer in React Native.
The next version needed to support large raster plans and PDF pages while keeping downloads, rendering, and interaction responsive. Harm explains that image pyramids split an image into tiles across zoom levels, so the viewer can load only the tiles needed for the current viewport. The team set goals that included 60 frames per second and avoiding memory exhaustion on low-end devices.
The team used Leaflet on the web and React Native Maps on mobile to test tiled plans. The proof of concept displayed the pyramid and markers, but the Google logo and map-oriented interaction and coordinate systems made it awkward for their centered-marker workflow. Harm says the team also found the library’s maintenance situation uncertain at the time.
The team replaced the map component with a custom viewer based on its earlier pan and zoom implementation, adapting it to position tile layers. Reanimated 2 shared values track scale and zoom, while virtualization limits rendering to visible tiles. The production component lets users navigate large plans and place markers, though some loading is visible.
Harm lists double-tap zoom, animated jumps to coordinates, and bouncy gestures as features still to add. Virtualization could improve, and sending visible-tile and zoom state back to JavaScript can cause frame drops. The component is not open source, though the team may consider releasing it if there is interest.
Takeaways
- Choose a component library against the exact interaction and data needs of the feature.
- Image pyramids can keep large plans usable by loading tiles for the current viewport.
- A map library may display custom tiles well but still impose map-specific coordinates and UX constraints.
- Virtualize tiles to limit memory use, and keep cross-thread state updates in mind when tuning frame rate.
- A proof of concept can validate feasibility while exposing library constraints before production integration.
Mentioned in this talk
Search inside this talk
What was claimed 9
- foundedMaxence Harm founded
Notion
“I started a SaaS company with my wife a few years back.”
YouTube Unverified1 source· Talk
- feature
Notion: Project management tools for construction professionals, including task management, time planning, cost tracking, communication, reporting, and floor plans
“It features lots of project management tools”
YouTube Unverified1 source· Talk
- uses
Notion uses React Native
“This company we're now building started as a side project in 2017, using React Native 0.34.”
YouTube Unverified1 source· Talk
- featureDeep Zoom: Loads square image tiles across pyramid levels to support detailed zooming
“the original file is split into square tiles.”
YouTube Unverified1 source· Talk
- uses
Notion uses React Native Maps
proof of concept“we made our proof of concept using React Native Maps.”
YouTube Unverified1 source· Talk
- usesweb viewer
“Leaflet was the solution we chose for the web”
YouTube Unverified1 source· Talk
- builtcustom React Native plan viewer using tiled image pyramids
“we managed to achieve what we wanted.”
YouTube Unverified1 source· Talk
- uses
Notion uses Reanimated
Reanimated 2“The new Reanimated API is much clearer to use.”
YouTube Unverified1 source· Talk





