/
githubmirror
/
Leaflet
Обзор
Документация
Войти
/
githubmirror
/
Leaflet
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.3.2
build/docs-misc.leafdoc
49 строк
1 KB
Iván Sánchez Ortega
Finish @yohanboniface's job by replacing more 🍂s with @s
02 апр 2016, 21:50
02 апр 2016, 21:50
a4a72cc
Код
Авторство
О чём код?
Miscellaneous bits of documentation that don't really fit anywhere else @namespace Global Switches Global switches are created for rare cases and generally make Leaflet to not detect a particular browser feature even if it's there. You need to set the switch as a global variable to true before including Leaflet on the page, like this: ```html <script>L_NO_TOUCH = true;</script> <script src="leaflet.js"></script> ``` | Switch | Description | | -------------- | ---------------- | | `L_NO_TOUCH` | Forces Leaflet to not use touch events even if it detects them. | | `L_DISABLE_3D` | Forces Leaflet to not use hardware-accelerated CSS 3D transforms for positioning (which may cause glitches in some rare environments) even if they're supported. | @namespace noConflict This method restores the `L` global variable to the original value it had before Leaflet inclusion, and returns the real Leaflet namespace so you can put it elsewhere, like this: ```html <script src='libs/l.js'> <!-- L points to some other library --> <script src='leaflet.js'> <!-- you include Leaflet, it replaces the L variable to Leaflet namespace --> <script> var Leaflet = L.noConflict(); // now L points to that other library again, and you can use Leaflet.Map etc. </script> ``` @namespace version A constant that represents the Leaflet version in use. ```js L.version; // contains "1.0.0" (or whatever version is currently in use) ```