Leaflet/build/docs-misc.leafdoc
Iván Sánchez Ortega 560e73bac5 Trying out Leafdoc comments in L.Marker
Added Leafdoc comments to Layer.js

Leafdoc comments for Popup, Layer

Leafdoc comments: L.Evented, inheritances, minor tilelayer

Leafdoc comments: gridlayer & tilelayer options

Leafdoc comments: tilelayer, marker drag

Typos

Leafdoc: switch to shorthand method params

Leafdoc: Switch to shorthands in marker drag, WMS.

Leafdoc: Vector layers

Leafdoc: Layer group, feature group, geojson

Leafdoc: LatLng, Point, Bounds, Icons.

Leafdoc: Controls.

Leafdoc: DOM & utils.

Leafdoc: "jake docs" now builds the documentation

Leafdoc: Commit actual templates instead of symlinks

Leafdoc: Fix broken build, have jake print out uglifyjs errors

Leafdoc: Several L.Map bits.

Leafdoc: Map handlers

Leafdoc: Map events, L.CRS, misc. fixes

Leafdoc: Fixed ordering of classes by using new leafdoc features

Leafdoc: Misc bits at the bottom of the docs

🍂doc: Map panes

🍂doc: CRSs, projections and their templates

🍂doc: miniclasses for map methods' options

Leafdoc: Cleanup L.Class, mark uninheritable sections, use Leafdoc 0.3.0

🍂doc: miniclasses for event types, bump to Leafdoc 1.0.0

🍂doc: Make linter happy after branch rebase

🍂doc: Tweaked headers for inherited stuff.

🍂doc: Tweaking section headers (white, padding, triangles)

Leafdoc: upgrade to 1.2, document SVG&Canvas, and misc bits

🍂doc: minor CSS tweaks, version in filename, typo.

Add missing bits - supersedes #4105, #4065, #4031

🍂doc: moved sections around, minor typos & fixes

Typo about LocationEvent
2016-04-02 15:59:39 +02:00

52 lines
1.4 KiB
Plaintext

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)
```