To test the examples of this page on your mobile device, just snap the QR-Code on the left.
You should also check out Topheman Street View, an application based on PanoramaSensorsViewer.
Summary :
Here is a list of demos using PanoramaSensorsViewer, so you could understand how to use the Google Maps API inside it.
This will work as well on a desktop as on a mobile device (what you should do is test it on your mobile device and watch the code on your desktop).
For each example, you will find :
PanoramaSensorsViewer ships some utils I made that can run in standalone (both non-AMD and AMD compatible). While you use PanoramaSensorsViewer, you don't have to worry about them but, it could come handy in some of your project.
We all have popup blockers like AdBlock on our browser, so if your application ever needs popups (I know it's old) and make sure it's been authorized by your user, the little class will let you know.
See the code on the PanoramaSensorsViewer github repository
Mostly all recent browsers expose an api for deviceorientation and devicemotion events. That doesn't mean the device you're on has sensors (accelerometer+gyroscope) to feed them.
So to check if the device has sensors, you can't rely on simple feature detection like "ondeviceorientation" in window or "ondevicemotion" in window
This module will let you check if there is really an accelerometer+gyroscope to rely on.
See the code on the PanoramaSensorsViewer github repository