15 |
16 | [[toc]]
17 |
18 | ## Examples
19 |
20 | ### Basic usage
21 |
22 |
23 |
27 |
28 |
29 |
30 |
31 | ```vue {10}
32 |
35 |
36 |
37 |
41 |
42 |
43 |
44 | ```
45 |
46 | ### Open popup on feature click
47 |
48 |
49 |
50 |
51 |
52 | <<< @/.vitepress/components/MapboxClusterWithPopupDemo.vue{6-8,10-28,38-47}
53 |
54 | :::warning
55 | The `:center` prop of the `MapboxMap` component must be set via a data property (see `mapCenter` in the example above) instead of directly in the template, as it can create unexpected behaviours when clicking on a cluster feature.
56 | :::
57 |
58 | ### Custom marker for unclustured points
59 |
60 |
61 |
62 |
63 |
64 | <<< @/.vitepress/components/MapboxClusterWithCustomImageDemo.vue{8,12-15,17}
65 |
66 | ## Props
67 |
68 |
69 | ### `data`
70 |
71 | - Type `[ String, Object ]`
72 | - Required `true`
73 |
74 | The source of the data for the clustered points, must be a String or an Object of GeoJSON format.
75 |
76 |
77 | ### `clusterMaxZoom`
78 |
79 | - Type `Number`
80 | - Default `14`
81 |
82 | The max zoom to cluster points on.
83 |
84 | ### `clusterRadius`
85 |
86 | - Type `Number`
87 | - Default `50`
88 |
89 | Radius of each cluster when clustering point.
90 |
91 | ### `clusterMinPoints`
92 |
93 | - Type `Number`
94 | - Default `2`
95 |
96 | Minimum number of points necessary to form a cluster.
97 |
98 | ### `clusterProperties`
99 |
100 | - Type `Object`
101 | - Default `{}}`
102 |
103 | An object defining custom properties on the generated clusters.
104 |
105 | ### `clustersLayout`
106 |
107 | - Type `Object`
108 | - Default `{}`
109 |
110 | The layout configuration for the clusters circles layer.
111 |
112 | ### `clustersPaint`
113 |
114 | - Type `Object`
115 | - Default `{ 'circle-color': '#000', 'circle-radius': 40 }`
116 |
117 | The paint configuration for the clusters circles layer.
118 |
119 | ### `clusterCountLayout`
120 |
121 | - Type `Object`
122 | - Default `{ 'text-field': [ 'get', 'point_count_abbreviated' ] }`
123 |
124 | The layout configuration for the clusters count layer.
125 |
126 | ### `clusterCountPaint`
127 |
128 | - Type `Object`
129 | - Default `{ 'text-color': 'white' }`
130 |
131 | The paint configuration for the clusters count layer.
132 |
133 | ### `unclusteredPointLayerType`
134 |
135 | - Type `String`
136 | - Default `'circle'`
137 |
138 | The type of the unclustered points layer.
139 |
140 | ### `unclusteredPointLayout`
141 |
142 | - Type `Object`
143 | - Default `{}`
144 |
145 | The layout configuration for the unclustered points layer.
146 |
147 | ### `unclusteredPointPaint`
148 |
149 | - Type `Object`
150 | - Default `{ 'circle-color': '#000', 'circle-radius': 4 }`
151 |
152 | The paint configuration for the unclustered points layer.
153 |
154 | ## Events
155 |
156 | ### `mb-cluster-click`
157 |
158 | Emitted when the user clicks on a cluster.
159 |
160 | **Params**
161 | - `clusterId`: the ID of the cluster being clicked
162 | - `event`: the Mapbox event object sent by the layer
163 |
164 | ### `mb-feature-click`
165 |
166 | Emitted when the user clicks on a unclustered point (a feature).
167 |
168 | **Params**
169 | - `feature`: the feature being clicked on
170 | - `event`: the Mapbox event object sent by the layer
171 |
172 | ### `mb-feature-mouseenter`
173 |
174 | Emitted when the user's mouse enters an unclustered point.
175 |
176 | **Params**
177 | - `feature`: the feature being clicked on
178 | - `event`: the Mapbox event object sent by the layer
179 |
180 | ### `mb-feature-mouseleave`
181 |
182 | Emitted when the user's mouse leaves an unclustered point.
183 |
184 | **Params**
185 | - `event`: the Mapbox event object sent by the layer
186 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxFullscreenControl/index.md:
--------------------------------------------------------------------------------
1 |
4 |
5 | # MapboxFullscreenControl
6 |
7 | Display a fullscreen control button on the map.
8 |
9 | - [Mapbox fullscreen control documentation](https://docs.mapbox.com/mapbox-gl-js/api/markers/#fullscreencontrol)
10 | - [Mapbox fullscreen control exemple](https://docs.mapbox.com/mapbox-gl-js/example/fullscreen/)
11 |
12 |
Table of contents
13 |
14 | [[toc]]
15 |
16 | ## Examples
17 |
18 | ### Basic usage
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 | ```vue {9}
30 |
33 |
34 |
38 |
39 |
40 | ```
41 |
42 |
43 | ## Props
44 |
45 | ### `container`
46 | - Type `HTMLElement`
47 | - Required: `false`
48 | - Default `null`
49 |
50 | The compatible DOM element which should be made full screen. By default, the map container element will be made full screen.
51 |
52 | ### `position`
53 | - Type `string`
54 | - Required: `false`
55 | - Default `'top-right'`
56 |
57 | The position for the fullscreen control.
58 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxGeocoder/index.md:
--------------------------------------------------------------------------------
1 |
4 |
5 | # MapboxGeocoder
6 |
7 | Display a search form to search for places using Mapbox Geocoding API.
8 | This component does not support outside of the map.
9 |
10 | - [Mapbox geocoder API reference](https://github.com/mapbox/mapbox-gl-geocoder)
11 |
12 |
Table of contents
13 |
14 | [[toc]]
15 |
16 | ## Examples
17 |
18 | ### Basic usage
19 |
20 |
21 |
22 |
23 |
24 | ```vue
25 |
26 |
30 |
31 |
32 |
33 |
34 |
38 | ```
39 |
40 | ### Without a map
41 |
42 | This component can be used outside of the `` component. You will need to pass the `accessToken` props.
43 |
44 |
45 |
46 |
47 |
48 | ```vue
49 |
57 |
58 |
59 | control = instance" />
62 |
63 | ```
64 |
65 | :::warning
66 | This feature requires a minimal version of `4.5.0` for the `@mapbox/mapbox-gl-geocoder` package, as per its [changelog entry](https://github.com/mapbox/mapbox-gl-geocoder/blob/master/CHANGELOG.md#v450).
67 | :::
68 |
69 | ## Props
70 |
71 | ### `accessToken`
72 | - Type `String`
73 | - Required: only when used without a map
74 | - Default: `no-token`
75 |
76 | Your Mapbox access token or `no-token` if you are not using a map style from Mapbox.
77 |
78 | ### `zoom`
79 | - Type `Number`
80 | - Required: `false`
81 | - Default: `16`
82 | Zoom level to use to animate the map when no result is found.
83 |
84 | ### `flyTo`
85 | - Type `[ Boolen, Object ]`
86 | - Required: `false`
87 | - Default: `true`
88 | If `false`, animating the map to a selected result is disabled. If `true`, animating the map will use the default animation parameters. If an object, it will be passed as options to the map flyTo or fitBounds method providing control over the animation of the transition.
89 |
90 | ### `placeholder`
91 | - Type `String`
92 | - Required: `false`
93 | - Default: `Search`
94 | Override the default placeholder attribute value.
95 |
96 | ### `proximity`
97 | - Type `Object`
98 | - Required: `false`
99 | - Default: `{}`
100 | A proximity argument: this is a geographical point given as an object with latitude and longitude properties. Search results closer to this point will be given higher priority.
101 |
102 | ### `trackProximity`
103 | - Type `Boolean`
104 | - Required: `false`
105 | - Default: `true`
106 | If `true`, the geocoder proximity will automatically update based on the map view.
107 |
108 | ### `collapsed`
109 | - Type `Boolean`
110 | - Required: `false`
111 | - Default: `false`
112 | If `true`, the geocoder control will collapse until hovered or in focus.
113 |
114 | ### `clearAndBlurOnEsc`
115 | - Type `Boolean`
116 | - Required: `false`
117 | - Default: `false`
118 | If `true`, the geocoder control will clear it's contents and blur when user presses the escape key.
119 |
120 | ### `clearOnBlur`
121 | - Type `Boolean`
122 | - Required: `false`
123 | - Default: `false`
124 | If `true`, the geocoder control will clear it's value when the input blurs.
125 |
126 | ### `bbox`
127 | - Type `Array`
128 | - Required: `false`
129 | - Default: `[]`
130 | A bounding box argument: this is a bounding box given as an array in the format [minX, minY, maxX, maxY]. Search results will be limited to the bounding box.
131 |
132 | ### `countries`
133 | - Type `String`
134 | - Required: `false`
135 | - Default: `''`
136 | A comma separated list of country codes to limit results to specified country or countries.
137 |
138 | ### `types`
139 | - Type `String`
140 | - Required: `false`
141 | - Default: `''`
142 | A comma seperated list of types that filter results to match those specified. [See documentation for available types](https://docs.mapbox.com/api/search/#data-types ). If reverseGeocode is enabled, you should specify one type. If you configure more than one type, the first type will be used.
143 |
144 | ### `minLength`
145 | - Type `Number`
146 | - Required: `false`
147 | - Default: `2`
148 | Minimum number of characters to enter before results are shown.
149 |
150 | ### `limit`
151 | - Type `Number`
152 | - Required: `false`
153 | - Default: `5`
154 | Maximum number of results to show.
155 |
156 | ### `language`
157 | - Type `String`
158 | - Required: `false`
159 | - Default: ``
160 | Specify the language to use for response text and query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. Defaults to the browser's language settings.
161 |
162 | ### `filter`
163 | - Type `Function`
164 | - Required: `false`
165 | - Default: ``
166 | A function which accepts a Feature in the [Carmen GeoJSON format](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) to filter out results from the Geocoding API response before they are included in the suggestions list. Return true to keep the item, false otherwise.
167 |
168 | ### `localGeocoder`
169 | - Type `Function`
170 | - Required: `false`
171 | - Default: ``
172 | A function accepting the query string which performs local geocoding to supplement results from the Mapbox Geocoding API. Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON format](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md).
173 |
174 | ### `reverseMode`
175 | - Type `String`
176 | - Required: `false`
177 | - Default: `distance`
178 | - Available values: `distance | score`
179 | Set the factors that are used to sort nearby results.
180 |
181 | ### `reverseGeocode`
182 | - Type `Boolean`
183 | - Required: `false`
184 | - Default: `false`
185 | If true, enable reverse geocoding mode. In reverse geocoding, search input is expected to be coordinates in the form lat, lon, with suggestions being the reverse geocodes.
186 |
187 | ### `enableEventLogging`
188 | - Type `Boolean`
189 | - Required: `false`
190 | - Default: `false`
191 | Allow Mapbox to collect anonymous usage statistics from the plugin.
192 |
193 | ### `marker`
194 | - Type `[ Boolean, Object ]`
195 | - Required: `false`
196 | - Default: `true`
197 | If `true`, a Marker will be added to the map at the location of the user-selected result using a default set of Marker options. If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map. Requires that options.mapboxgl also be set.
198 |
199 | ### `render`
200 | - Type `Function,`
201 | - Required: `false`
202 | - Default: ``
203 | A function that specifies how the results should be rendered in the dropdown menu. This function should accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string. Any HTML in the returned string will be rendered.
204 |
205 | ### `getItemValue`
206 | - Type `Function,`
207 | - Required: `false`
208 | - Default: `(item) => item.place_name`
209 | A function that specifies how the selected result should be rendered in the search bar. This function should accept a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string. HTML tags in the output string will not be rendered.
210 |
211 | ### `mode`
212 | - Type `String,`
213 | - Required: `false`
214 | - Default: `mapbox.places`
215 | A string specifying the geocoding endpoint to query. Options are `mapbox.places` and `mapbox.places-permanent`. The `mapbox.places-permanent` mode requires an enterprise license for permanent geocodes.
216 |
217 | ### `localGeocoderOnly`
218 | - Type `Boolean,`
219 | - Required: `false`
220 | - Default: `false`
221 | If `true`, indicates that the localGeocoder results should be the only ones returned to the user. If `false`, indicates that the localGeocoder results should be combined with those from the Mapbox API with the localGeocoder results ranked higher.
222 |
223 |
224 | [Documentation of all paramaters available in options](https://github.com/mapbox/mapbox-gl-geocoder/blob/master/API.md#parameters)
225 |
226 |
227 | ## Events
228 | All events available on the `MapboxGeocoder` class are also available on the `MapboxGeocoder` component, prefixed by `mb-`.
229 |
230 | ### `mb-created`
231 |
232 | Emitted when the `MapboxGeocoder` instance is created with the instance as parameter.
233 |
234 | ### `mb-loading`
235 |
236 | Emitted when the geocoder is looking up a query. Receive a `{ query }` parameter.
237 |
238 | ### `mb-results`
239 |
240 | Emitted when the geocoder returns a response. Receive a `{ results }` parameter.
241 |
242 | ### `mb-result`
243 |
244 | Emitted when input is set. Receive a `{ result }` parameter.
245 |
246 | ### `mb-error`
247 |
248 | Emitted when input is set. Receive a `error` parameter.
249 |
250 | ### `mb-clear`
251 |
252 | Emitted when the input is cleared.
253 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxGeolocateControl/index.md:
--------------------------------------------------------------------------------
1 |
5 |
6 | # MapboxGeolocateControl
7 |
8 | Display a geolocatation control button on the map. When activated the map will travel to the user location.
9 |
10 | This button **will not display** for user who are blocking the acces to the gps postion.
11 |
12 | - [Mapbox geolocation control documentation](https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol.event:geolocate)
13 | - [Mapbox geolocation control exemple](https://docs.mapbox.com/mapbox-gl-js/example/locate-user/)
14 |
15 |
16 |
Table of contents
17 |
18 | [[toc]]
19 |
20 | ## Examples
21 |
22 | ### Basic usage
23 |
24 |
25 |
29 |
30 |
31 |
32 |
33 | ```vue {9}
34 |
37 |
38 |
42 |
43 |
44 | ```
45 |
46 |
47 | ## Props
48 |
49 | ### `positionOptions`
50 | - Type `[ Object ]`
51 | - Required: `false`
52 | - Default `{ enableHighAccuracy:false, timeout:6000 }`
53 |
54 | A Geolocation API PositionOptions object.
55 |
56 | ### `fitBoundsOptions`
57 | - Type `[ Object ]`
58 | - Required: `false`
59 | - Default `{ maxZoom: 15 }`
60 |
61 | A fitBounds options object to use when the map is panned and zoomed to the user's location. The default is to use a maxZoom of 15 to limit how far the map will zoom in for very accurate locations.
62 |
63 | ### `trackUserLocation`
64 | - Type `[ Boolean ]`
65 | - Required: `false`
66 | - Default `false`
67 |
68 | If true the Geolocate Control becomes a toggle button and when active the map will receive updates to the user's location as it changes.
69 |
70 | ### `showAccuracyCircle`
71 | - Type `[ Boolean ]`
72 | - Required: `false`
73 | - Default `true`
74 |
75 | By default, if showUserLocation is true , a transparent circle will be drawn around the user location indicating the accuracy (95% confidence level) of the user's location. Set to false to disable. Always disabled when showUserLocation is false .
76 |
77 | ### `showUserHeading`
78 | - Type `[ Boolean ]`
79 | - Required: `false`
80 | - Default `false`
81 |
82 | If `true` an arrow will be drawn next to the user location dot indicating the device's heading. This only has affect when `trackUserLocation` is `true`.
83 |
84 | ### `showUserLocation`
85 | - Type `[ Boolean ]`
86 | - Required: `false`
87 | - Default `true`
88 |
89 | By default a dot will be shown on the map at the user's location. Set to false to disable.
90 |
91 | ### `position`
92 | - Type `[ String ]`
93 | - Required: `false`
94 | - Default `top-right`
95 |
96 | The position for the geolocation control.
97 |
98 |
99 | ## Events
100 |
101 | ### `mb-trackuserlocationstart`
102 | Emitted when the geolocation is started.
103 |
104 | ### `mb-trackuserlocationend`
105 | Emitted when the geolocation is ended.
106 |
107 | ### `mb-trackuserlocationgeolocate`
108 | Emitted on each Geolocation API position update which returned as success.
109 |
110 | ### `mb-error`
111 | Emitted on each Geolocation API position update which returned as an error.
112 |
113 | ### `mb-outofmaxbounds`
114 | Emitted on each Geolocation API position update which returned as success but user position is out of map maxBounds.
115 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxImage/index.md:
--------------------------------------------------------------------------------
1 |
7 |
8 | # MapboxImage
9 |
10 | Add an image to be used used in `icon-image`, `background-pattern`, `fill-pattern`, and `line-pattern`.
11 |
12 | - [`addImage` documentation](https://docs.mapbox.com/mapbox-gl-js/api/#map#addimage)
13 | - [Add an icon to the map example](https://docs.mapbox.com/mapbox-gl-js/example/add-image/)
14 | - [Add a generated icon to the map](https://docs.mapbox.com/mapbox-gl-js/example/add-image-generated/)
15 |
16 |
17 |
Table of contents
18 |
19 | [[toc]]
20 |
21 | ## Examples
22 |
23 | ### Add an icon to the map
24 |
25 |
26 |
32 |
35 |
59 |
60 |
61 |
62 |
63 | ```vue {12-14}
64 |
70 |
71 |
72 |
78 |
81 |
82 |
83 | ```
84 |
85 | ## Props
86 |
87 | ### `id`
88 |
89 | - Type `String`
90 | - Required `true`
91 |
92 | The ID of the image. This will be used to refer to this image.
93 |
94 | ### `src`
95 |
96 | - Type `[ String, HTMLImageElement, ImageData, Object ]`
97 | - Required `true`
98 |
99 | The image as String, an HTMLImageElement, ImageData, or object with width, height, and data properties with the same format as ImageData.
100 |
101 | ### `options`
102 |
103 | - Type `Object`
104 | - Default `{ pixelRatio: 1, sdf: false }`
105 |
106 | This options object will be passed directly to the `addImage` method.
107 |
108 | ## Events
109 |
110 | ### `add`
111 |
112 | Emitted when the image has been added to the map with the [`addImage`](https://docs.mapbox.com/mapbox-gl-js/api/#map#addimage) method.
113 |
114 | **Properties**
115 |
116 | - `image` _(`Object`)_ The image's informations
117 | - `image.id` _(`String`)_ The ID given to the image
118 | - `image.src` _(`HTMLImageElement | ImageData | Object`)_ The generated source of the image when the given source is a string; the given source otherwise
119 | - `image.options` _(`Object`)_ The options object used with the `addImage` method
120 |
121 |
122 | ## Slots
123 |
124 | ### `default`
125 |
126 | The default slot will be rendered _after_ the image has been added to the map — when the `add` event is emitted.
127 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxImages/index.md:
--------------------------------------------------------------------------------
1 |
4 |
5 | # MapboxImages
6 |
7 | Add multiple images at once to be used used in `icon-image`, `background-pattern`, `fill-pattern`, and `line-pattern`. This component is a wrapper around the [`MapboxImage`](/components/MapboxImage/) component.
8 |
9 |
Table of contents
10 |
11 | [[toc]]
12 |
13 | ## Examples
14 |
15 | ### Add multiple icons to the map
16 |
17 |
18 |
19 |
20 |
21 | <<< @/.vitepress/components/MapboxImagesDemo.vue{4-13,15-49,59-61}
22 |
23 | ## Props
24 |
25 | ### `sources`
26 |
27 | - Type `Array`
28 | - Required `true`
29 |
30 | A list of images to add to the map.
31 |
32 | ### `source.id`
33 |
34 | - Type `String`
35 | - Required `true`
36 |
37 | The ID of the image. This will be used to refer to this image.
38 |
39 | ### `source.src`
40 |
41 | - Type `[ String, HTMLImageElement, ImageData, Object ]`
42 | - Required `true`
43 |
44 | The image as String, an HTMLImageElement, ImageData, or object with width, height, and data properties with the same format as ImageData.
45 |
46 | ### `source.options`
47 |
48 | - Type `Object`
49 | - Default `{ pixelRatio: 1, sdf: false }`
50 |
51 | This options object will be passed directly to the `addImage` method.
52 |
53 | ## Events
54 |
55 |
56 | ### `add`
57 |
58 | Emitted for each image being added to the map with the [`addImage`](https://docs.mapbox.com/mapbox-gl-js/api/#map#addimage) method.
59 |
60 | **Properties**
61 |
62 | - `image` _(`Object`)_ The image's informations, directly passed from the `add` event of the `MapboxImage component
63 | - `image.id` _(`String`)_ The ID given to the image
64 | - `image.src` _(`HTMLImageElement | ImageData | Object`)_ The generated source of the image when the given source is a string; the given source otherwise
65 | - `image.options` _(`Object`)_ The options object used with the `addImage` method
66 | - `index` _(`Number`)_ The index of the image which has been added
67 | - `total` _(`Number`)_ The total number of images to add
68 |
69 | ### `ready`
70 |
71 | Emitted when all images have been added to the map.
72 |
73 | **Properties**
74 |
75 | - `images` _(`Array`)_ An array containing all the added images' object emitted by the `add` event
76 |
77 | ## Slots
78 |
79 | ### `default`
80 |
81 | The default slot will be rendered _after_ the images have been added to the map — when the `ready` event is emitted.
82 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxLayer/index.md:
--------------------------------------------------------------------------------
1 | # MapboxLayer
2 |
3 | ...
4 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxMap/index.md:
--------------------------------------------------------------------------------
1 |
7 |
8 | # MapboxMap
9 |
10 | Root component, it is required to have a working map. This component is based on the `Map` class of Mapbox GL, all props are mapped to the `options` passed to the class constructor.
11 |
12 | It is recommended to have a look at their [API reference](https://docs.mapbox.com/mapbox-gl-js/api/#map) on the subject.
13 |
14 |
Table of contents
15 |
16 | [[toc]]
17 |
18 | ## Examples
19 |
20 | ### Basic usage
21 |
22 |
23 |
29 |
30 |
31 | ```vue
32 |
38 |
39 |
40 |
46 |
47 | ```
48 |
49 | ### Accessing the Mapbox instance
50 |
51 | You will probably need to use the Mapbox instance to use some of its methods such as `flyTo`, `panTo`, etc. The `MapboxMap` component emits an `mb-ready` event right after the Mapbox instantiation, with the Mapbox instance of [`Map`](https://docs.mapbox.com/mapbox-gl-js/api/#map) as a parameter. See the example below:
52 |
53 | ```vue{5,18}
54 |
55 | map = mapInstance" />
59 |
60 |
61 |
76 | ```
77 |
78 | ## Props
79 |
80 | ### `accessToken`
81 |
82 | - Type `String`
83 | - Required `true`
84 |
85 | Your Mapbox access token.
86 |
87 | ### `mapStyle`
88 |
89 | - Type `[ String, Object ]`
90 | - Required `true`
91 |
92 | A map style definition, can be a JSON object following the [Mapbox Style specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/) of an URL to such a JSON. This prop is mapped to the `options.style` configuration of the map creation.
93 |
94 | ### `container`
95 |
96 | - Type `[ HTMLElement, String ]`
97 | - Default `undefined`
98 |
99 | ### `minZoom`
100 |
101 | - Type `Number`
102 | - Default `0`
103 |
104 | ### `maxZoom`
105 |
106 | - Type `Number`
107 | - Default `22`
108 |
109 | ### `minPitch`
110 |
111 | - Type: `Number`
112 | - Default: `0`
113 |
114 | ### `maxPitch`
115 |
116 | - Type: `Number`
117 | - Default: `60`
118 |
119 | ### `hash`
120 |
121 | - Type `Boolean`
122 | - Default `false`
123 |
124 | ### `interactive`
125 |
126 | - Type `Boolean`
127 | - Default `true`
128 |
129 | ### `bearingSnap`
130 |
131 | - Type `Number`
132 | - Default `7`
133 |
134 | ### `pitchWithRotate`
135 |
136 | - Type `Boolean`
137 | - Default `true`
138 |
139 | ### `clickTolerance`
140 |
141 | - Type `Number`
142 | - Default `3`
143 |
144 | ### `attributionControl`
145 |
146 | - Type `Boolean`
147 | - Default `true`
148 |
149 | ### `customAttribution`
150 |
151 | - Type `[ String, Array ]`
152 | - Default `null`
153 |
154 | ### `logoPosition`
155 |
156 | - Type `String`
157 | - Default `'bottom-left'`
158 |
159 | ### `failIfMajorPerformanceCaveat`
160 |
161 | - Type `Boolean`
162 | - Default `false`
163 |
164 | ### `preserveDrawingBuffer`
165 |
166 | - Type `Boolean`
167 | - Default `false`
168 |
169 | ### `antialias`
170 |
171 | - Type `Boolean`
172 | - Default `false`
173 |
174 | ### `refreshExpiredTiles`
175 |
176 | - Type `Boolean`
177 | - Default `true`
178 |
179 | ### `maxBounds`
180 |
181 | - Type `[ LngLatBounds, Array ]`
182 | - Default `undefined`
183 |
184 | ### `scrollZoom`
185 |
186 | - Type `[ Boolean, Object ]`
187 | - Default `true`
188 |
189 | ### `boxZoom`
190 |
191 | - Type `Boolean`
192 | - Default `true`
193 |
194 | ### `dragRotate`
195 |
196 | - Type `Boolean`
197 | - Default `true`
198 |
199 | ### `dragPan`
200 |
201 | - Type `[ Boolean, Object ]`
202 | - Default `true`
203 |
204 | ### `keyboard`
205 |
206 | - Type `Boolean`
207 | - Default `true`
208 |
209 | ### `doubleClickZoom`
210 |
211 | - Type `Boolean`
212 | - Default `true`
213 |
214 | ### `touchZoomRotate`
215 |
216 | - Type `[ Boolean, Object ]`
217 | - Default `true`
218 |
219 | ### `trackResize`
220 |
221 | - Type `Boolean`
222 | - Default `true`
223 |
224 | ### `center`
225 |
226 | - Type `[ LngLat, Array, Object ]`
227 | - Default `() => [ 0, 0 ]`
228 |
229 | ### `zoom`
230 |
231 | - Type `Number`
232 | - Default `0`
233 |
234 | ### `bearing`
235 |
236 | - Type `Number`
237 | - Default `0`
238 |
239 | ### `pitch`
240 |
241 | - Type `Number`
242 | - Default `0`
243 |
244 | ### `bounds`
245 |
246 | - Type `[ LngLatBounds, Array ]`
247 | - Default `undefined`
248 |
249 | ### `fitBoundsOptions`
250 |
251 | - Type `Object`
252 | - Default `null`
253 |
254 | ### `renderWorldCopies`
255 |
256 | - Type `Boolean`
257 | - Default `true`
258 |
259 | ### `maxTileCacheSize`
260 |
261 | - Type `Number`
262 | - Default `null`
263 |
264 | ### `localIdeographFontFamily`
265 |
266 | - Type `String`
267 | - Default `'sans-serif'`
268 |
269 | ### `transformRequest`
270 |
271 | - Type `Function`
272 | - Default `null`
273 |
274 | ### `collectResourceTiming`
275 |
276 | - Type `Boolean`
277 | - Default `false`
278 |
279 | ### `fadeDuration`
280 |
281 | - Type `Number`
282 | - Default `300`
283 |
284 | ### `crossSourceCollisions`
285 |
286 | - Type `Boolean`
287 | - Default `true`
288 |
289 | ### `cooperativeGestures`
290 |
291 | - Type: `Boolean`
292 | - Default: `false`
293 |
294 | ### `language`
295 |
296 | - Type: `["auto", String, Array]`
297 | - Default: `null`
298 |
299 | ### `locale`
300 |
301 | - Type: `Object`
302 | - Default: `null`
303 |
304 | ### `localFontFamily`
305 |
306 | - Type: `String`
307 | - Default: `false`
308 |
309 | ### `minTileCacheSize`
310 |
311 | - Type: `Number`
312 | - Default: `null`
313 |
314 | ### `optimizeForTerrain`
315 |
316 | - Type: `Boolean`
317 | - Default: `true`
318 |
319 | ::: warning
320 | The `optimizeForTerrain` prop will only work with `mapbox-gl@2`, as it has been removed in v3.0.0 of the package (see [release notes](https://github.com/mapbox/mapbox-gl-js/releases/tag/v3.0.0)).
321 | :::
322 |
323 | ### `performanceMetricsCollection`
324 |
325 | - Type: `Boolean`
326 | - Default: `true`
327 |
328 | ### `projection`
329 |
330 | - Type: `ProjectionSpecification`
331 | - Default: `'mercator'`
332 |
333 | ### `style`
334 |
335 | - Type: `[Object, String]`
336 |
337 | ### `testMode`
338 |
339 | - Type: `Boolean`
340 | - Default: `false`
341 |
342 | ### `touchPitch`
343 |
344 | - Type: `[Boolean, Object]`
345 | - Default: `true`
346 |
347 | ### `useWebGL2`
348 |
349 | - Type: `Boolean`
350 | - Default: `false`
351 |
352 | ### `worldview`
353 |
354 | - Type: `String`
355 | - Default: `null`
356 |
357 | ## Events
358 |
359 | ### `mb-created`
360 |
361 | Emitted when the Mapbox instance has been created.
362 |
363 | **Params**
364 |
365 | - `map` (`Map`): the Mapbox map instance
366 |
367 | ### Other events
368 |
369 | In addition to the `mb-created` event, all events available on the Mapbox `Map` class are also available on the `MapboxMap` component, prefixed by `mb-`.
370 |
371 | - `resize` → `mb-resize`
372 | - `click` → `mb-click`
373 | - ...
374 |
375 | See the [API Reference](https://docs.mapbox.com/mapbox-gl-js/api/#map.event:resize) on the subject for more detailed information about each event.
376 |
377 | ## Slots
378 |
379 | ### `default`
380 |
381 | The `default` slot must contain all other components as the `mapbox-gl` instance is provided by this component to be injected in all its children.
382 |
383 | See the documentation on [provide / inject](https://vuejs.org/v2/api/#provide-inject) for more informations.
384 |
385 | ### `loader`
386 |
387 | This slot is displayed while the map is loading.
388 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxMarker/index.md:
--------------------------------------------------------------------------------
1 |
5 |
6 | # MapboxMarker
7 |
8 | Display a marker on the map.
9 |
10 | - [`Marker` API reference](https://docs.mapbox.com/mapbox-gl-js/api/#marker)
11 |
12 |
Table of contents
13 |
14 | [[toc]]
15 |
16 | ## Examples
17 |
18 | ### Basic usage
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 | ```vue {10}
30 |
33 |
34 |
35 |
39 |
40 |
41 |
42 | ```
43 |
44 | ### Custom HTML
45 |
46 |
47 |
48 |
49 |
50 | <<< @/.vitepress/components/MapboxMarkerCustomHtmlDemo.vue{12-14,19-23}
51 |
52 | ### Linked popup
53 |
54 |
55 |
56 |
57 |
58 | <<< @/.vitepress/components/MapboxMarkerPopupDemo.vue{12-16}
59 |
60 | ## Props
61 |
62 | ### `lngLat`
63 |
64 | - Type `Array`
65 | - Required: `true`
66 |
67 | ### `popup`
68 |
69 | - Type `[ Object, Boolean ]`
70 | - Default: `false`
71 |
72 | ### `element`
73 |
74 | - Type `HTMLElement`
75 | - Default: `null`
76 |
77 | ### `offset`
78 |
79 | - Type `[ Point, Array ]`
80 | - Default: `null`
81 |
82 | ### `anchor`
83 |
84 | - Type `String`
85 | - Default: `'center'`
86 |
87 | ### `color`
88 |
89 | - Type `String`
90 | - Default: `null`
91 |
92 | ### `scale`
93 |
94 | - Type `Number`
95 | - Default: `1`
96 |
97 | ### `draggable`
98 |
99 | - Type `Boolean`
100 | - Default: `false`
101 |
102 | ### `rotation`
103 |
104 | - Type: `Number`
105 | - Default: `0`
106 |
107 | ### `pitchAlignment`
108 |
109 | - Type: `String`
110 | - Default: `'auto'`
111 |
112 | ### `rotationAlignment`
113 |
114 | - Type: `String`
115 | - Default: `'auto'`
116 |
117 |
118 | ## Events
119 |
120 | All events available on the `Marker` class are also available on the `MapboxMarker` component, prefixed by `mb-`.
121 |
122 | ### `mb-dragstart`
123 |
124 | Mapped to the [`dragstart` event](https://docs.mapbox.com/mapbox-gl-js/api/#marker.event:dragstart) of the `Marker` class.
125 |
126 | ### `mb-drag`
127 |
128 | Mapped to the [`drag` event](https://docs.mapbox.com/mapbox-gl-js/api/#marker.event:drag) of the `Marker` class.
129 |
130 | ### `mb-dragend`
131 |
132 | Mapped to the [`dragend` event](https://docs.mapbox.com/mapbox-gl-js/api/#marker.event:dragend) of the `Marker` class.
133 |
134 | ## Slots
135 |
136 | ### `default`
137 |
138 | The `default` slot is used for marker with custom HTML.
139 |
140 | ### `popup`
141 |
142 | The `popup` slot will be rendered inside the attached popup.
143 |
--------------------------------------------------------------------------------
/packages/docs/components/MapboxNavigationControl/index.md:
--------------------------------------------------------------------------------
1 |
4 |
5 | # MapboxNavigationControl
6 |
7 | Display navigation controls on the map, including two zoom buttons + - and a compass button to rotate the map.
8 |
9 | - [Mapbox navigation controls documentation](https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol)
10 | - [Mapbox navigation controls example](https://docs.mapbox.com/mapbox-gl-js/example/navigation/)
11 |
12 |
13 |