Skip to content

Commit

Permalink
Add some API doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed May 23, 2024
1 parent 1d74cd3 commit 759b975
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/components/controls/fullscreen.control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export default defineComponent({
return PositionValues.indexOf(v) !== -1;
},
},
/**
* container is the compatible DOM element which should be made full screen. By default, the map container element will be made full screen.
*/
container: {
type: Object as PropType<HTMLElement>,
default: null,
Expand Down
15 changes: 15 additions & 0 deletions lib/components/controls/geolocate.control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,38 @@ export default defineComponent({
return PositionValues.indexOf(v) !== -1;
},
},
/**
* A Geolocation API [PositionOptions](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions) object.
*/
positionOptions: {
type: Object as PropType<PositionOptions>,
default: () =>
({ enableHighAccuracy: false, timeout: 6000 }) as PositionOptions,
},
/**
* A 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.
*/
fitBoundsOptions: {
type: Object as PropType<FitBoundsOptions>,
default: () => ({ maxZoom: 15 }) as FitBoundsOptions,
},
/**
* If true the GeolocateControl becomes a toggle button and when active the map will receive updates to the user's location as it changes.
*/
trackUserLocation: {
type: Boolean as PropType<boolean>,
default: false,
},
/**
* 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.
*/
showAccuracyCircle: {
type: Boolean as PropType<boolean>,
default: true,
},
/**
* By default a dot will be shown on the map at the user's location. Set to false to disable.
*/
showUserLocation: {
type: Boolean as PropType<boolean>,
default: true,
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/canvas.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const sourceOpts = AllSourceOptions<CanvasSourceSpecification>({
coordinates: undefined,
});

/**
* See [CanvasSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/CanvasSource/)
*/
export default defineComponent({
name: "MglCanvasSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/geojson.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ type DataType =
| GeoJSON.FeatureCollection<GeoJSON.Geometry>
| string;

/**
* See [GeoJSONSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/)
*/
export default defineComponent({
name: "MglGeoJsonSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/image.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const sourceOpts = AllSourceOptions<ImageSourceSpecification>({
coordinates: undefined,
});

/**
* See [ImageSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/ImageSource/)
*/
export default defineComponent({
name: "MglImageSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/raster.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const sourceOpts = AllSourceOptions<RasterSourceSpecification>({
volatile: undefined,
});

/**
* See [RasterTileSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/RasterTileSource/)
*/
export default defineComponent({
name: "MglRasterSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/rasterDem.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const sourceOpts = AllSourceOptions<RasterDEMSourceSpecification>({
baseShift: undefined,
});

/**
* See [RasterDEMTileSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/RasterDEMTileSource/)
*/
export default defineComponent({
name: "MglRasterDemSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/vector.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const sourceOpts = AllSourceOptions<VectorSourceSpecification>({
volatile: undefined,
});

/**
* See [VectorTileSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/VectorTileSource/)
*/
export default defineComponent({
name: "MglVectorSource",
props: {
Expand Down
3 changes: 3 additions & 0 deletions lib/components/sources/video.source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const sourceOpts = AllSourceOptions<VideoSourceSpecification>({
coordinates: undefined,
});

/**
* See [VideoSource](https://maplibre.org/maplibre-gl-js/docs/API/classes/VideoSource/)
*/
export default defineComponent({
name: "MglVideoSource",
props: {
Expand Down

0 comments on commit 759b975

Please sign in to comment.