Examples for Use Case: Change the Bearing of a Map

Those mapping APIs that allow the map view to be rotated, in the sense of the projected view being rotated around the centre point so that the bearing of the top of the map is not North, usually allow this to be specified either when the map view is created and initialised or later via an exposed property or method.

In the API examples the latter technique is used, to demonstrate that the map view can be dynamically updated in this respect.

Jump to section…

Google Maps embed

Not applicable

OpenStreetMap embed

Not applicable

Bing Maps embed

Not applicable

MapBox Studio embed

Leaflet.js (with OpenStreetMap tiles)

Not applicable: Leaflet.js does not support any bearing other than North.

OpenLayers with OpenStreetMap tiles

Google Maps API

Not applicable

Bing Maps Control API

Not applicable

MapKit JS (Apple Maps) API

Mapbox GL JS API

TomTom Maps SDK for Web with vector maps

Not applicable.

D3 Geographies APIs