Skip to content

Commit

Permalink
Merge pull request #1 from U29/feature-add-initial-rotation-option
Browse files Browse the repository at this point in the history
Add optional rotation property to RView type
  • Loading branch information
U29 authored Oct 23, 2024
2 parents 610cca6 + 3a881d6 commit e57695c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export type RView = {
center: Coordinate;
/** Zoom level, 0 is the whole world, 28 is maximum resolution */
zoom: number;
/** Optional The initial rotation for the view in radians (positive rotation clockwise, 0 means North). */
rotation?: number;
/**
* Optional resolution in meters per pixel
*
Expand Down Expand Up @@ -135,6 +137,7 @@ export default class RMap extends RlayersBase<RMapProps, Record<string, never>>
projection: props.projection,
center: props.initial.center,
zoom: props.initial.resolution === undefined ? props.initial.zoom : undefined,
rotation: props.initial.rotation,
resolution: props.initial.resolution,
extent: props.extent,
minResolution: props.minResolution,
Expand Down

0 comments on commit e57695c

Please sign in to comment.