Add camera presets and enhance App component with camera controls
This commit is contained in:
@@ -48,6 +48,23 @@ Available methods:
|
||||
- `flyTo(coordinate, duration?)` — quick helper that animates to a small region around `coordinate`.
|
||||
- `fitBounds(northEast, southWest, options?)` — fit the two coordinates with optional `edgePadding`.
|
||||
|
||||
### Camera presets
|
||||
|
||||
For convenience, `CameraPresets` provides common camera configurations you can pass into `animateCamera`.
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
import { CameraPresets } from '@lynkedup/map-sdk';
|
||||
mapRef.current?.animateCamera(CameraPresets.viewOverlook({ latitude: 37.78825, longitude: -122.4324 }), { duration: 1000 });
|
||||
```
|
||||
|
||||
Provided presets:
|
||||
|
||||
- `viewOverlook(center)` — tilt and rotate to create an overview with pitch ~65° and heading ~45°.
|
||||
- `streetLevel(center)` — street-level view (pitch 0, zoom high).
|
||||
- `overview(center)` — wide overview of the area.
|
||||
|
||||
---
|
||||
|
||||
## PropertyMap (high-level SDK component) ✅
|
||||
|
||||
Reference in New Issue
Block a user