You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ui/map.js
+72-2Lines changed: 72 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,8 @@ type MapOptions = {
79
79
scrollZoom?: boolean,
80
80
minZoom?: ?number,
81
81
maxZoom?: ?number,
82
+
minPitch?: ?number,
83
+
maxPitch?: ?number,
82
84
boxZoom?: boolean,
83
85
dragRotate?: boolean,
84
86
dragPan?: boolean,
@@ -97,6 +99,10 @@ type MapOptions = {
97
99
98
100
constdefaultMinZoom=0;
99
101
constdefaultMaxZoom=22;
102
+
103
+
constdefaultMinPitch=0;
104
+
constdefaultMaxPitch=60;
105
+
100
106
constdefaultOptions={
101
107
center: [0,0],
102
108
zoom: 0,
@@ -106,6 +112,9 @@ const defaultOptions = {
106
112
minZoom: defaultMinZoom,
107
113
maxZoom: defaultMaxZoom,
108
114
115
+
minPitch: defaultMinPitch,
116
+
maxPitch: defaultMaxPitch,
117
+
109
118
interactive: true,
110
119
scrollZoom: true,
111
120
boxZoom: true,
@@ -147,6 +156,8 @@ const defaultOptions = {
147
156
* @param {HTMLElement|string} options.container The HTML element in which Mapbox GL JS will render the map, or the element's string `id`. The specified element must have no children.
148
157
* @param {number} [options.minZoom=0] The minimum zoom level of the map (0-24).
149
158
* @param {number} [options.maxZoom=22] The maximum zoom level of the map (0-24).
159
+
* @param {number} [options.minPitch=0] The minimum pitch of the map (0-90).
160
+
* @param {number} [options.maxPitch=60] The maximum pitch of the map (0-90).
150
161
* @param {Object|string} [options.style] The map's Mapbox style. This must be an a JSON object conforming to
151
162
* the schema described in the [Mapbox Style Specification](https://mapbox.com/mapbox-gl-style-spec/), or a URL to
0 commit comments