You can programmatically adjust tilt and rotation (heading) on a vector map. In this example, we add some buttons to programmatically adjust tilt and heading.
Understand the code
Setting tilt and heading
setTilt()to set the tilt angle of the map. Use
getTilt()to get the current tilt value.
setHeading()to set the heading of the map. Use
getHeading()to get the current heading value.
Git and Node.js are required to run this sample locally. Follow these instructions to install Node.js and NPM. The following commands clone, install dependencies and start the sample application.
git clone -b sample-webgl-tilt-rotation https://github.com/googlemaps/js-samples.git
Other samples can be tried by switching to any branch beginning with
git checkout sample-SAMPLE_NAME