1.1 KiB
1.1 KiB
name, description
| name | description |
|---|---|
| remotion-maps-static | Create a deterministic static locator map in Remotion when neither the camera nor geographic data animates. |
Static map
Use a static image when the map only provides location context. This is the smallest, fastest, and most deterministic map technique.
Build
- Export or request a map image at the composition's final aspect ratio and at least its rendered pixel dimensions.
- Store the image in the Remotion project's
public/directory. - Render it with
CanvasImageandstaticFile(). - Add labels or markers as ordinary Remotion elements if they remain fixed.
import React from 'react';
import {AbsoluteFill, CanvasImage, staticFile} from 'remotion';
export const StaticMap: React.FC = () => {
return (
<>
<CanvasImage
src={staticFile('locator-map.png')}
style={{width: '100%', height: '100%', objectFit: 'cover'}}
/>
</>
);
};
Overlays and Interactivity
Follow Remotion Interactivity best practices and Remotion Markup Best practices for elements.