Skip to content

Commit 8962523

Browse files
authored
Merge pull request #4 from zhz0704/update-maps-control-version
Update azure-maps-control version
2 parents f9603b8 + 3a7acb9 commit 8962523

File tree

9 files changed

+2724
-836
lines changed

9 files changed

+2724
-836
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
node-version: [14.x, 16.x, 18.x, 20.x]
21+
node-version: [16.x, 18.x, 20.x, 22.x]
2222
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323

2424
steps:
@@ -30,3 +30,5 @@ jobs:
3030
cache: 'npm'
3131
- run: npm ci --force
3232
- run: npm run build --if-present
33+
- run: python -m pip install linkcheckmd
34+
- run: python -m linkcheckmd README.md

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Azure Maps Gridded Data Source module Changelog
22

3+
<a name="0.0.3"></a>
4+
## 0.0.3 (Unreleased)
5+
6+
- Update dependencies versions.
7+
- Update readme links.
8+
39
<a name="0.0.2"></a>
410
## 0.0.2 (2021-10-1)
511

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,17 @@ A couple of the key features of this module:
2525

2626
| Name | Image | Description |
2727
|-------|------|-------------|
28-
| Hexagon | ![hexagon grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/hexagon.png) | A haxagon grid where the top of the hexagon is flat. |
29-
| Pointy hexagon | ![pointy hexagon grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/pointyhexagon.png) | A haxagon grid where the top of the hexagon is pointy. |
30-
| Square | ![square grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/square.png) | A sguare grid. |
31-
| Triangle | ![triangle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/triangle.png) | A triangular grid. |
32-
| Circle | ![circle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/circle.png) | A square grid where cells are converted into circles. The circle does not cover the entire area the cell represents, but does include all points that would fall within the specified grid cell. |
33-
| Hexagon circle | ![hexagon circle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/blob/main/docs/images/hexcircle.png) | A haxagon grid where cells are converted into circles. The circle does not cover the entire area the cell represents, but does include all points that would fall within the specified grid cell. |
28+
| Hexagon | ![hexagon grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/hexagon.png) | A haxagon grid where the top of the hexagon is flat. |
29+
| Pointy hexagon | ![pointy hexagon grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/pointyhexagon.png) | A haxagon grid where the top of the hexagon is pointy. |
30+
| Square | ![square grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/square.png) | A sguare grid. |
31+
| Triangle | ![triangle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/triangle.png) | A triangular grid. |
32+
| Circle | ![circle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/circle.png) | A square grid where cells are converted into circles. The circle does not cover the entire area the cell represents, but does include all points that would fall within the specified grid cell. |
33+
| Hexagon circle | ![hexagon circle grid](https://github.com/Azure-Samples/azure-maps-gridded-data-source/raw/main/docs/images/hexcircle.png) | A haxagon grid where cells are converted into circles. The circle does not cover the entire area the cell represents, but does include all points that would fall within the specified grid cell. |
3434

3535
**Credit**
3636

3737
A lot of the hexagon grid based algorithms came from this [awesome site](https://www.redblobgames.com/grids/hexagons/).
3838

39-
Triangle grid calculations are based on this [blog post](http://csharphelper.com/blog/2015/10/draw-a-triangular-grid-in-c/)
40-
4139
## Getting started
4240

4341
Download the project and copy the `azure-maps-gridded-data-source` JavaScript file from the `dist` folder into your project.
@@ -46,14 +44,14 @@ See the [documentation](https://github.com/Azure-Samples/azure-maps-gridded-data
4644

4745
## Samples
4846

49-
[Extruded gridded data source](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Extruded%20gridded%20data%20source)
50-
<br/>[<img src="https://github.com/Azure-Samples/AzureMapsCodeSamples/raw/master/AzureMapsCodeSamples/SiteResources/screenshots/Extruded-gridded-data-source.jpg" height="200px">](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Extruded%20gridded%20data%20source)
47+
[Extruded gridded data source](https://samples.azuremaps.com/?search=gridded&sample=extruded-gridded-data-source)
48+
<br/>[<img src="https://samples.azuremaps.com/polygons/extruded-gridded-data-source/screenshot.jpg" height="200px">](https://samples.azuremaps.com/?search=gridded&sample=extruded-gridded-data-source)
5149

52-
[Show points of gridded data source](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Show%20points%20of%20gridded%20data%20source)
53-
<br/>[<img src="https://github.com/Azure-Samples/AzureMapsCodeSamples/raw/master/AzureMapsCodeSamples/SiteResources/screenshots/Show-points-of-gridded-data-source.jpg" height="200px">](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Show%20points%20of%20gridded%20data%20source)
50+
[Show points of gridded data source](https://samples.azuremaps.com/?search=gridded&sample=show-points-of-gridded-data-source)
51+
<br/>[<img src="https://samples.azuremaps.com/polygons/show-points-of-gridded-data-source/screenshot.jpg" height="200px">](https://samples.azuremaps.com/?search=gridded&sample=show-points-of-gridded-data-source)
5452

55-
[Gridded data source options](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Gridded%20data%20source%20options)
56-
<br/>[<img src="https://github.com/Azure-Samples/AzureMapsCodeSamples/raw/master/AzureMapsCodeSamples/SiteResources/screenshots/Gridded-data-source-options.jpg" height="200px">](https://azuremapscodesamples.azurewebsites.net/index.html?sample=Gridded%20data%20source%20options)
53+
[Gridded data source options](https://samples.azuremaps.com/?search=gridded&sample=gridded-data-source-options)
54+
<br/>[<img src="https://samples.azuremaps.com/polygons/gridded-data-source-options/screenshot.jpg" height="200px">](https://samples.azuremaps.com/?search=gridded&sample=gridded-data-source-options)
5755

5856
## Ideas for enhancements
5957

@@ -76,15 +74,14 @@ See the [documentation](https://github.com/Azure-Samples/azure-maps-gridded-data
7674
**Additional projects**
7775

7876
* [Azure Maps Web SDK Samples](https://github.com/Azure-Samples/AzureMapsCodeSamples)
79-
* [Azure Maps Gov Cloud Web SDK Samples](https://github.com/Azure-Samples/AzureMapsGovCloudCodeSamples)
8077
* [Azure Maps & Azure Active Directory Samples](https://github.com/Azure-Samples/Azure-Maps-AzureAD-Samples)
8178
* [List of open-source Azure Maps projects](https://github.com/microsoft/Maps/blob/master/AzureMaps.md)
8279

8380
## Additional Resources
8481

85-
* [Azure Maps (main site)](https://azure.com/maps)
82+
* [Azure Maps (main site)](https://azure.microsoft.com/en-us/products/azure-maps/)
8683
* [Azure Maps Documentation](https://docs.microsoft.com/azure/azure-maps/index)
87-
* [Azure Maps Blog](https://azure.microsoft.com/blog/topics/azure-maps/)
84+
* [Azure Maps Blog](https://azure.microsoft.com/en-us/blog/product/azure-maps/)
8885
* [Microsoft Q&A](https://docs.microsoft.com/answers/topics/azure-maps.html)
8986
* [Azure Maps feedback](https://feedback.azure.com/forums/909172-azure-maps)
9087

dist/azure-maps-gridded-data-source.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ MIT License
2626
'use strict';
2727

2828
/*! *****************************************************************************
29-
Copyright (c) Microsoft Corporation. All rights reserved.
30-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
31-
this file except in compliance with the License. You may obtain a copy of the
32-
License at http://www.apache.org/licenses/LICENSE-2.0
29+
Copyright (c) Microsoft Corporation.
3330
34-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
35-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
36-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
37-
MERCHANTABLITY OR NON-INFRINGEMENT.
31+
Permission to use, copy, modify, and/or distribute this software for any
32+
purpose with or without fee is hereby granted.
3833
39-
See the Apache Version 2.0 License for specific language governing permissions
40-
and limitations under the License.
34+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40+
PERFORMANCE OF THIS SOFTWARE.
4141
***************************************************************************** */
4242
/* global Reflect, Promise */
4343

@@ -216,7 +216,7 @@ MIT License
216216
if (exp.length >= 3) {
217217
return new ComparisonExp(exp[0], Expression.parse(exp[1]), Expression.parse(exp[2]));
218218
}
219-
throw "Invalid '" + exp[1] + "' expression.";
219+
throw "Invalid '".concat(exp[1], "' expression.");
220220
};
221221
ComparisonExp.prototype.eval = function (val) {
222222
var self = this;
@@ -260,7 +260,7 @@ MIT License
260260
}
261261
return new MathExp(exp[0], conditions);
262262
}
263-
throw "Invalid '" + exp[0] + "' expression.";
263+
throw "Invalid '".concat(exp[0], "' expression.");
264264
};
265265
MathExp.prototype.eval = function (val) {
266266
var self = this;
@@ -317,7 +317,7 @@ MIT License
317317
case 'tan':
318318
return math.tan(v1);
319319
}
320-
throw "Invalid '" + self._o + "' expression.";
320+
throw "Invalid '".concat(self._o, "' expression.");
321321
};
322322
MathExp.prototype._evalArray = function (val) {
323323
var self = this;
@@ -922,7 +922,7 @@ MIT License
922922
//Parse the map expressions for aggregates.
923923
var mapExpressions = (hasAggregates) ? self._parseMapExpressions(options.aggregateProperties) : {};
924924
//Parse the scale expression.
925-
var scaleExpression = Expression.parse(options.scaleExpression || self.LinearPointCountScaleExpression);
925+
var scaleExpression = Expression.parse((options.scaleExpression || self.LinearPointCountScaleExpression));
926926
//Precalculate arc angle values for cell polygon generation.
927927
var arcAngles = self._getArcAngles(options.gridType);
928928
var sqrt3 = Math.sqrt(3);
@@ -960,7 +960,7 @@ MIT License
960960
//Calculate the cubic coordinate for the data bin that contains the points pixel coordinate.
961961
self._getCellCoord(pixel, width, height, options.gridType, coord, sqrt3);
962962
//Create a unique id for the bin using the x, y and z, parameters of the cubic coordinate.
963-
var cellId = "x" + coord.col + "y" + coord.row + "z" + coord.z;
963+
var cellId = "x".concat(coord.col, "y").concat(coord.row, "z").concat(coord.z);
964964
var cell = self._getGridCell(cellId, coord, i, gridInfo, width, height, options.gridType, hasAggregates);
965965
//Calculate aggregates and metrics for cell.
966966
self._incrementCellInfo(cell.properties, points[i], options.aggregateProperties, mapExpressions);
@@ -979,7 +979,7 @@ MIT License
979979
GridMath.recalculateCoords = function (gridInfo, options) {
980980
var self = this;
981981
//Parse the scale expression.
982-
var scaleExpression = Expression.parse(options.scaleExpression || self.LinearPointCountScaleExpression);
982+
var scaleExpression = Expression.parse((options.scaleExpression || self.LinearPointCountScaleExpression));
983983
var minCellWidth = azmaps.math.convertDistance(Math.min(options.minCellWidth, options.cellWidth), options.distanceUnits, 'meters') / self._getGroundResolutionZ22(options.centerLatitude);
984984
for (var i = 0, len = gridInfo.cells.length; i < len; i++) {
985985
gridInfo.cells[i].geometry.coordinates = self.createGridPolygon(gridInfo.cells[i].properties, options, gridInfo.width, gridInfo.height, self._getArcAngles(options.gridType), minCellWidth, scaleExpression, gridInfo.scaleMetrics);
@@ -1381,10 +1381,10 @@ MIT License
13811381
//Generate an abbreviated version of the point count.
13821382
var abbrv = count.toString();
13831383
if (count >= 1000000) {
1384-
abbrv = Math.round(count / 1000000) + "M";
1384+
abbrv = "".concat(Math.round(count / 1000000), "M");
13851385
}
13861386
else if (count >= 1000) {
1387-
abbrv = Math.round(count / 1000) + "k";
1387+
abbrv = "".concat(Math.round(count / 1000), "k");
13881388
}
13891389
cellInfo.point_count_abbreviated = abbrv;
13901390
var scaleVal = count;

dist/azure-maps-gridded-data-source.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)