Skip to content

Commit 12acb9e

Browse files
committed
Upgrade GeoPackge JS dependency to support styles.
1 parent 6af09e8 commit 12acb9e

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ MAGE adheres to [Semantic Versioning](http://semver.org/).
88
##### Features
99

1010
##### Bug Fixes
11-
* Change Graphics Magick call to orient image attachments such that exif metadata is not lost.
12-
* Web should not prompt for device uid, if device admin approval is not enabled.
13-
* Fix bug in 3rd party authentication which was not properly adding authenticated users.
1411

1512
## [5.4.4](https://github.com/ngageoint/mage-server/releases/tag/5.4.4)
1613

1714
##### Features
15+
* Support for "Feature Style" extension, upgrade to newest version of GeoPackage JS.
1816

1917
##### Bug Fixes
2018
* Change Graphics Magick call to orient image attachments such that exif metadata is not lost.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@mapbox/togeojson": "0.16.0",
26-
"@ngageoint/geopackage": "3.0.0-beta.1",
26+
"@ngageoint/geopackage": "3.0.7",
2727
"@turf/centroid": "4.3.0",
2828
"@turf/kinks": "4.3.0",
2929
"adm-zip": "0.4.9",

routes/layers.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ module.exports = function(app, security) {
286286
};
287287

288288
const style = {
289-
stroke: req.query.stroke || '#000000FF',
290-
fill: req.query.fill || '#00000011',
291-
width: req.query.width || 1
289+
stroke: req.query.stroke,
290+
fill: req.query.fill,
291+
width: req.query.width
292292
};
293293

294294
const table = req.layer.tables.find(table => table.name === req.params.tableName);
@@ -375,11 +375,10 @@ module.exports = function(app, security) {
375375
z: Number(req.params.z)
376376
};
377377

378-
console.log('query width', req.query.width);
379378
const style = {
380-
stroke: req.query.stroke || '#000000FF',
381-
fill: req.query.fill || '#00000011',
382-
width: req.query.width || 1
379+
stroke: req.query.stroke,
380+
fill: req.query.fill,
381+
width: req.query.width
383382
};
384383

385384
const table = req.layer.tables.find(table => table.name === req.params.tableName);

utilities/geopackage.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const fs = require('fs-extra'),
22
path = require('path'),
3-
GP = require('@ngageoint/geopackage'),
4-
GeoPackageAPI = require('@ngageoint/geopackage').GeoPackage,
3+
GeoPackageAPI = require('@ngageoint/geopackage').GeoPackageAPI,
54
FeatureTile = require('@ngageoint/geopackage').FeatureTiles,
65
ShadedFeaturesTile = require('@ngageoint/geopackage').ShadedFeaturesTile,
76
environment = require('../environment/env');
@@ -101,21 +100,22 @@ async function tile(layer, tableName, { stroke, width: lineWidth, fill }, { x, y
101100
if (!featureDao) return;
102101
const ft = new FeatureTile(featureDao, width, height);
103102

104-
ft.setPointColor(stroke)
105-
ft.setLineColor(stroke);
106-
ft.setPolygonColor(stroke);
103+
ft.pointColor = stroke;
104+
ft.lineColor = stroke;
105+
ft.polygonColor = stroke;
107106

108-
ft.setPolygonFillColor(fill);
107+
ft.polygonFillColor = fill;
109108

110-
ft.setPointRadius(lineWidth);
111-
ft.setPolygonStrokeWidth(lineWidth);
112-
ft.setLineStrokeWidth(lineWidth);
109+
ft.pointRadius = lineWidth;
110+
ft.polygonStrokeWidth = lineWidth;
111+
ft.lineStrokeWidth = lineWidth;
113112

114-
ft.setMaxFeaturesPerTile(10000);
113+
ft.maxFeaturesPerTile = 10000;
115114

116115
const shadedFeaturesTile = new ShadedFeaturesTile();
117-
ft.setMaxFeaturesTileDraw(shadedFeaturesTile);
116+
ft.maxFeaturesTileDraw = shadedFeaturesTile;
118117
tile = await ft.drawTile(x, y, z);
118+
119119
break;
120120
}
121121

0 commit comments

Comments
 (0)