File: api-docs.rst

package info (click to toggle)
python-pyqtlet2 0.9.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,672 kB
  • sloc: python: 997; javascript: 88; makefile: 18; sh: 14
file content (120 lines) | stat: -rw-r--r-- 2,408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
API Documentation
=================

pyqtlet was designed to mimic the `Official Leaflet API <https://leafletjs.com/reference-1.3.0.html>`_
as much as possible, similar to how PyQt5 mimics Qt. This allows a large amount of 
laziness when it actually comes to writing the API docs for the module.

The documentation will only cover what methods have been implemented in pyqtlet.
The details about functionality, options etc. should be obtained from the Leaflet site.
In case of any discrepancies or specially implemented features, they will be mentioned
here in the docs. Otherwise, expect the method to be identical to its JS counterpart.

L.Evented
---------
Baseclass for all pyqtlet objects. All objects will inherit these methods

Methods
^^^^^^^
    * getJsResponse(str:js, function:callback)
        Runs the javascript and then triggers callback with the response
    * runJavaScript(str:js)
        Runs the javascript in the leaflet runtime

L.map
-----
L.map should be initialised with the mapWidget instead of the id of the map div.

Signals
^^^^^^^
    * clicked
    * zoom
    * drawCreated

Methods
^^^^^^^
    * addControl
    * addLayer
    * flyTo
    * getCenter  `[requires callback]`
    * getBounds  `[requires callback]`
    * getZoom  `[requires callback]`
    * getState: `[requires callback]`
        gets center, zoom, bounds, minZoom, maxZoom, size, pixelBounds, pixelOrigin and pixelWorldBounds  
    * hasLayer
    * panTo
    * removeControl
    * removeLayer
    * setMaxBounds
    * fitBounds
    * setMaxZoom
    * setMinZoom
    * setView

L.Layer
-------
Base class for all layer classes

Methods
^^^^^^^
    * addTo
    * bindPopup
    * bindTooltip
    * removeFrom
    * unbindPopup
    * unbindTooltip

L.imageOverlay
--------------

L.tileLayer
-----------

L.marker
--------

Methods
^^^^^^^
    * setLatLng
    * setOpacity

L.circleMarker
--------------

L.polyline
----------

L.polygon
---------

L.rectangle
-----------

L.circle
--------

L.layerGroup
------------

Methods
^^^^^^^
    * addLayer
    * removeLayer
    * clearLayers
    * toGeoJSON

L.featureGroup
--------------
Inherits from layerGroup

Methods
^^^^^^^
    * createAndAddDrawnLayer(drawnLayer, options=None)
        creates and adds layer to the feature group
        drawnLayer: dict as returned by the 'draw:created' event.

L.control.layers
----------------

L.control.draw
--------------