Skip to content

Commit e9813a2

Browse files
committed
Update api-reference.md
1 parent 1e6295b commit e9813a2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/api-reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ Point features will be extracted from `atlas.Shape` objects, but this shape will
2121

2222
| Name | Return type | Description |
2323
|------|-------------|-------------|
24-
| `add(points: azmaps.data.FeatureCollection \| azmaps.data.Feature<azmaps.data.Point, any> \| azmaps.data.Point \| azmaps.Shape \| Array<azmaps.data.Feature<azmaps.data.Point, any> \| azmaps.data.Point \| azmaps.Shape>)` | | Adds points to the data source. |
24+
| `add(points: atlas.data.FeatureCollection \| atlas.data.Feature<atlas.data.Point, any> \| atlas.data.Point \| atlas.Shape \| Array<atlas.data.Feature<atlas.data.Point, any> \| atlas.data.Point \| atlas.Shape>)` | | Adds points to the data source. |
2525
| `clear()` | | Removes all data in the data source. |
2626
| `dispose()` | | Cleans up any resources this data source is consuming. |
27-
| `getCellChildren(cell_id: string)` | `azmaps.data.Feature<azmaps.data.Point, any>[]` | Gets all points that are within the specified grid cell. |
28-
| `getGridCells()` | `azmaps.data.FeatureCollection` | Gets all grid cell polygons as a GeoJSON FeatureCollection. |
27+
| `getCellChildren(cell_id: string)` | `atlas.data.Feature<atlas.data.Point, any>[]` | Gets all points that are within the specified grid cell. |
28+
| `getGridCells()` | `atlas.data.FeatureCollection` | Gets all grid cell polygons as a GeoJSON FeatureCollection. |
2929
| `getId()` | `string` | Gets the ID of the data source. |
3030
| `getOptions()` | `GriddedDataSourceOptions` | Gets the options used by the data source. |
31-
| `getPoints()` | `azmaps.data.FeatureCollection` | Gets all points as a GeoJSON FeatureCollection. |
31+
| `getPoints()` | `atlas.data.FeatureCollection` | Gets all points as a GeoJSON FeatureCollection. |
3232
| `importDataFromUrl(url: string)` | `Promise<void>` | Downloads a GeoJSON document and imports its data into the data source. The GeoJSON document must be on the same domain or accessible using CORS. |
33-
| `remove(point: number \| string \| azmaps.data.Feature<azmaps.data.Point, any> \| azmaps.Shape \| Array<number \| string \| azmaps.data.Feature<azmaps.data.Point, any>> \| azmaps.Shape)` | | Removes one or more points from the data source. If a string is passed in, it is assumed to be an id. If a number is passed in, removes the point at that index. |
33+
| `remove(point: number \| string \| atlas.data.Feature<atlas.data.Point, any> \| atlas.Shape \| Array<number \| string \| atlas.data.Feature<atlas.data.Point, any>> \| atlas.Shape)` | | Removes one or more points from the data source. If a string is passed in, it is assumed to be an id. If a number is passed in, removes the point at that index. |
3434
| `removeById(id: number \| string \| Array<number \| string>)` | | Removes one or more points from the datasource based on its id. |
3535
| `setOptions(options: GriddedDataSourceOptions)` | | Sets the data source options. The data source will retain its current values for any option not specified in the supplied options. |
36-
| `setPoints(points: azmaps.data.FeatureCollection \| Array<azmaps.data.Feature<azmaps.data.Point, any> \| azmaps.data.Point \| azmaps.Shape>)` | | Overwrites all points in the data source with the new array of points. |
36+
| `setPoints(points: atlas.data.FeatureCollection \| Array<atlas.data.Feature<atlas.data.Point, any> \| atlas.data.Point \| atlas.Shape>)` | | Overwrites all points in the data source with the new array of points. |
3737

3838
**Usage**
3939

@@ -63,15 +63,15 @@ Options for a gridded data source.
6363

6464
| Name | Value | Description |
6565
|------|-------|-------------|
66-
| `aggregateProperties` | `Record<string, azmaps.AggregateExpression>` | Defines custom properties that are calculated using expressions against all the points within each grid cell and added to the properties of each grid cell polygon. See also the [Supported Expressions](supported-expressions.md) document for more details. |
66+
| `aggregateProperties` | `Record<string, atlas.AggregateExpression>` | Defines custom properties that are calculated using expressions against all the points within each grid cell and added to the properties of each grid cell polygon. See also the [Supported Expressions](supported-expressions.md) document for more details. |
6767
| `cellWidth` | `number` | The spatial width of each cell in the grid in the specified distance units. Default: `25000` |
6868
| `centerLatitude` | `number` | The latitude value used to calculate the pixel equivalent of the cellWidth. Default: `0` |
6969
| `coverage` | `number` | A number between 0 and 1 that specifies how much area a cell polygon should consume within the grid cell. This applies a multiplier to the scale of all cells. If `scaleProperty` is specified, this will add additional scaling. Default: `1` |
70-
| `distanceUnits` | `azmaps.math.DistanceUnits` | The distance units of the cellWidth option. Default: `meters` |
70+
| `distanceUnits` | `atlas.math.DistanceUnits` | The distance units of the cellWidth option. Default: `meters` |
7171
| `gridType` | `GridType` | The shape of the data bin to generate. Default: `hexagon` |
7272
| `minCellWidth` | `number` | The minimium cell width to use by the coverage and scaling operations. Will be snapped to the `cellWidth` if greater than that value. Default: `0` |
7373
| `maxZoom` | `number` | Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels). Default: `18` |
74-
| `scaleExpression` | `azmaps.Expression` | A data driven expression that customizes how the scaling function is done. This expression has access to the properties of the cell (CellInfo) and the following two properties;<br/><br/>`min` - The minimium aggregate value across all cells in the data source.<br/>`max` - The maximium aggregate value across all cells in the data source.<br/><br/>A linear scaling function based on the "point_count" property is used by default `scale = (point_count - min)/(max - min)`.<br/><br/>Default: `['/', ['-', ['get', 'point_count'], ['get', 'min']], ['-', ['get', 'max'], ['get', 'min']]]` |
74+
| `scaleExpression` | `atlas.Expression` | A data driven expression that customizes how the scaling function is done. This expression has access to the properties of the cell (CellInfo) and the following two properties;<br/><br/>`min` - The minimium aggregate value across all cells in the data source.<br/>`max` - The maximium aggregate value across all cells in the data source.<br/><br/>A linear scaling function based on the "point_count" property is used by default `scale = (point_count - min)/(max - min)`.<br/><br/>Default: `['/', ['-', ['get', 'point_count'], ['get', 'min']], ['-', ['get', 'max'], ['get', 'min']]]` |
7575
| `scaleProperty` | `string` | The aggregate property to calculate the `min`/`max` values over the whole data set. Can be an aggregate property or `point_count`. |
7676

7777
## GridType enum
@@ -107,7 +107,7 @@ Properties of a grid cell polygon.
107107
| Name | Value | Description |
108108
|------|-------|-------------|
109109
| `aggregateProperties` | `Record<string, number \| boolean>` | The calculated aggregate values. |
110-
| `cell_id` | `string` | A unique ID for the cluster that can be used with the GriddedDataSource getCellChildren methods. |
110+
| `cell_id` | `string` | A unique ID for the cluster that can be used with the `GriddedDataSource` `getCellChildren` methods. |
111111
| `point_count` | `number` | The number of pounts in the cell. |
112112
| `point_count_abbreviated` | `string` | A string that abbreviates the point_count value if it's long. (for example, 4,000 becomes 4K) |
113113

0 commit comments

Comments
 (0)