Skip to content

Commit

Permalink
Remove info about animating projection change
Browse files Browse the repository at this point in the history
  • Loading branch information
sebstryczek committed Jan 13, 2025
1 parent dbad2ed commit a15e55c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,21 +329,17 @@ This will overwrite the `projection` property from the style (if any) and will p

- Use the built-in methods:
```ts
const animate = false;
map.enableGlobeProjection(animate);
map.enableGlobeProjection();
// or
map.enableMercatorProjection(animate);
map.enableMercatorProjection();
```

The animated transition is enabled by default, but can be disabled by passing `false`, as in the example above. Similarly to the `projection` option in the constructor, this will overwrite the projection settings from style (if any) and persist it when the style is updated.

The projection setter built in Maplibre GL JS is also usable:
```ts
map.setProjection({type: "mercator"});
// or
map.setProjection({type: "globe"});
```
but this will not automatically animate the transition and may cause rendering glitches.

- Using the `MaptilerProjectionControl`. Not mounted by default, it can easily be added with a single option in the `Map` constructor:
```ts
Expand Down

0 comments on commit a15e55c

Please sign in to comment.