---
title: supported
source: https://vjmap.com/en/doc/supported.html
---

# supported

测试浏览器是否支持`webgl`.

### Parameters
- `options` **`Object`?**
    - `options.failIfMajorPerformanceCaveat` **`boolean`**如果`true`，如果`true`，`false`如果性能比预期的差很多（例如，将使用软件 WebGL 渲染器），该函数将返回。（任选，默认`false`）

### Examples
```
// Show an alert if the browser does not support webgl
if (!vjmap.supported()) {
  alert('Your browser does not support `webgl`');
}
```

返回 **`boolean`**

[1]: #map

[2]: #parameters

[3]: #examples

[4]: #scrollzoom

[5]: #boxzoom

[6]: #dragrotate

[7]: #dragpan

[8]: #keyboard

[9]: #doubleclickzoom

[10]: #touchzoomrotate

[11]: #touchpitch

[12]: #addcontrol

[13]: #removecontrol

[14]: #hascontrol

[15]: #resize

[16]: #getbounds

[17]: #getmaxbounds

[18]: #setmaxbounds

[19]: #setminzoom

[20]: #getminzoom

[21]: #setmaxzoom

[22]: #getmaxzoom

[23]: #setminpitch

[24]: #getminpitch

[25]: #setmaxpitch

[26]: #getmaxpitch

[27]: #getrenderworldcopies

[28]: #setrenderworldcopies

[29]: #project

[30]: #unproject

[31]: #ismoving

[32]: #iszooming

[33]: #isrotating

[34]: #on

[35]: #once

[36]: #off

[37]: #queryrenderedfeatures

[38]: #querysourcefeatures

[39]: #setstyle

[40]: #getstyle

[41]: #isstyleloaded

[42]: #addsource

[43]: #issourceloaded

[44]: #aretilesloaded

[45]: #removesource

[46]: #getsource

[47]: #addimage

[48]: #updateimage

[49]: #hasimage

[50]: #removeimage

[51]: #loadimage

[52]: #listimages

[53]: #addlayer

[54]: #movelayer

[55]: #removelayer

[56]: #getlayer

[57]: #setlayerzoomrange

[58]: #setfilter

[59]: #getfilter

[60]: #setpaintproperty

[61]: #getpaintproperty

[62]: #setlayoutproperty

[63]: #getlayoutproperty

[64]: #setlight

[65]: #getlight

[66]: #setterrain

[67]: #getterrain

[68]: #setfog

[69]: #getfog

[70]: #queryterrainelevation

[71]: #setfeaturestate

[72]: #removefeaturestate

[73]: #getfeaturestate

[74]: #getcontainer

[75]: #getcanvascontainer

[76]: #getcanvas

[77]: #loaded

[78]: #remove

[79]: #triggerrepaint

[80]: #showtileboundaries

[81]: #showterrainwireframe

[82]: #showpadding

[83]: #showcollisionboxes

[84]: #repaint

[85]: #version

[86]: #getcenter

[87]: #setcenter

[88]: #panby

[89]: #panto

[90]: #getzoom

[91]: #setzoom

[92]: #zoomto

[93]: #zoomin

[94]: #zoomout

[95]: #getbearing

[96]: #setbearing

[97]: #getpadding

[98]: #setpadding

[99]: #rotateto

[100]: #resetnorth

[101]: #resetnorthpitch

[102]: #snaptonorth

[103]: #getpitch

[104]: #setpitch

[105]: #cameraforbounds

[106]: #fitbounds

[107]: #fitscreencoordinates

[108]: #jumpto

[109]: #getfreecameraoptions

[110]: #setfreecameraoptions

[111]: #easeto

[112]: #flyto

[113]: #stop

[114]: #mousedown

[115]: #properties

[116]: #mouseup

[117]: #mouseover

[118]: #mousemove

[119]: #click

[120]: #dblclick

[121]: #mouseenter

[122]: #mouseleave

[123]: #mouseout

[124]: #contextmenu

[125]: #wheel

[126]: #touchstart

[127]: #touchend

[128]: #touchmove

[129]: #touchcancel

[130]: #movestart

[131]: #move

[132]: #moveend

[133]: #dragstart

[134]: #drag

[135]: #dragend

[136]: #zoomstart

[137]: #zoom

[138]: #zoomend

[139]: #rotatestart

[140]: #rotate

[141]: #rotateend

[142]: #pitchstart

[143]: #pitch

[144]: #pitchend

[145]: #boxzoomstart

[146]: #boxzoomend

[147]: #boxzoomcancel

[148]: #webglcontextlost

[149]: #webglcontextrestored

[150]: #load

[151]: #render

[152]: #idle

[153]: #error

[154]: #data

[155]: #styledata

[156]: #sourcedata

[157]: #dataloading

[158]: #styledataloading

[159]: #sourcedataloading

[160]: #styleimagemissing

[161]: #icontrol

[162]: #onadd

[163]: #onremove

[164]: #getdefaultposition

[165]: #point

[166]: #pointlike

[167]: #proxysourcecache

[168]: #proxiedtileid

[169]: #elevationqueryoptions

[170]: #elevation

[171]: #getatpointorzero

[172]: #getatpoint

[173]: #getminmaxfortile

[174]: #getminelevationbelowmsl

[175]: #raycast

[176]: #pointcoordinate

[177]: #demsampler

[178]: #boxzoomhandler

[179]: #isenabled

[180]: #isactive

[181]: #enable

[182]: #disable

[183]: #touchpitchhandler

[184]: #keyboardhandler

[185]: #disablerotation

[186]: #enablerotation

[187]: #scrollzoomhandler

[188]: #setzoomrate

[189]: #setwheelzoomrate

[190]: #doubleclickzoomhandler

[191]: #dragpanhandler

[192]: #dragrotatehandler

[193]: #touchzoomrotatehandler

[194]: #cameraoptions

[195]: #animationoptions

[196]: #paddingoptions

[197]: #navigationcontrol

[198]: #geolocatecontrol

[199]: #trigger

[200]: #geolocate

[201]: #outofmaxbounds

[202]: #trackuserlocationstart

[203]: #trackuserlocationend

[204]: #attributioncontrol

[205]: #scalecontrol

[206]: #setunit

[207]: #fullscreencontrol

[208]: #popup

[209]: #addto

[210]: #isopen

[211]: #getlnglat

[212]: #setlnglat

[213]: #trackpointer

[214]: #getelement

[215]: #settext

[216]: #sethtml

[217]: #getmaxwidth

[218]: #setmaxwidth

[219]: #setdomcontent

[220]: #addclassname

[221]: #removeclassname

[222]: #setoffset

[223]: #toggleclassname

[224]: #open

[225]: #close

[226]: #mapmouseevent

[227]: #type

[228]: #target

[229]: #originalevent

[230]: #lnglat

[231]: #preventdefault

[232]: #maptouchevent

[233]: #points

[234]: #lnglats

[235]: #mapwheelevent

[236]: #zoomevent

[237]: #mapdataevent

[238]: #marker

[239]: #setpopup

[240]: #getpopup

[241]: #togglepopup

[242]: #getoffset

[243]: #setdraggable

[244]: #isdraggable

[245]: #setrotation

[246]: #getrotation

[247]: #setrotationalignment

[248]: #getrotationalignment

[249]: #setpitchalignment

[250]: #getpitchalignment

[251]: #styleimageinterface

[252]: #requestparameters

[253]: #querygeometry

[254]: #ispointquery

[255]: #bufferedscreengeometry

[256]: #bufferedcamerageometry

[257]: #containstile

[258]: #bufferedscreenmercator

[259]: #createfromscreenpoints

[260]: #vectortilesource

[261]: #settiles

[262]: #seturl

[263]: #videosource

[264]: #pause

[265]: #play

[266]: #getvideo

[267]: #setcoordinates

[268]: #imagesource

[269]: #canvassourceoptions

[270]: #canvassource

[271]: #geojsonsource

[272]: #setdata

[273]: #getclusterexpansionzoom

[274]: #getclusterchildren

[275]: #getclusterleaves

[276]: #customlayerinterface

[277]: #prerender

[278]: #wrap

[279]: #toarray

[280]: #tostring

[281]: #distanceto

[282]: #tobounds

[283]: #convert

[284]: #lnglatlike

[285]: #lnglatbounds

[286]: #setnortheast

[287]: #setsouthwest

[288]: #extend

[289]: #getsouthwest

[290]: #getnortheast

[291]: #getnorthwest

[292]: #getsoutheast

[293]: #getwest

[294]: #getsouth

[295]: #geteast

[296]: #getnorth

[297]: #isempty

[298]: #contains

[299]: #lnglatboundslike

[300]: #mercatorcoordinate

[301]: #tolnglat

[302]: #toaltitude

[303]: #meterinmercatorcoordinateunits

[304]: #fromlnglat

[305]: #evented

[306]: #getaabbpointsquaredist

[307]: #polygonizebounds

[308]: #bufferconvexpolygon

[309]: #freecameraoptions

[310]: #lookatpoint

[311]: #setpitchbearing

[312]: #freecamera

[313]: #prewarm

[314]: #%e4%be%8b%e5%ad%90

[315]: #clearprewarmedresources

[316]: #workercount

[317]: #maxparallelimagerequests

[318]: #clearstorage

[319]: #workerclass

[320]: #time

[321]: #supported



<a name="readmemd"></a>

vjmap / [Exports](#modulesmd)

# vjmap

如需更改mapboxgl的内容，需去
D:\w\vclient\deps\mapbox-gl-js-2.5.1\
yarn build-prod-min
把编译后的 mapbox-gl.js 拷贝至 D:\w\vclient\node_modules\mapbox-gl\dist下面

更新记录
2023-10-13 增加对webgl2的支持

# Classes


<a name="classesanimatemarkerlayermd"></a>

[vjmap](#readmemd) / [Exports](#modulesmd) / AnimateMarkerLayer
