Document Maps JavaScript API Advanced Tutorial Auxiliary Library Browser helper function

Browser helper function

This article introduces the browser helper function AMap.Browser in the JS API. This function can help developers determine the browser, system version, and some rendering features of the browser, assisting developers in making some common browser feature judgments.

//Browser UA information
var ua = AMap.Browser.ua;
//Browser platform type
var plat = AMap.Browser.plat;
//Whether the browser supports Canvas
var canvas = AMap.Browser.isCanvas;
//Does the browser support WebGL
var isWebGL = AMap.Browser.isWebGL;