Files Changed
5 files โข +142 -38
-
src/tilestream.js
+84 -12
-
src/wms-cache.js
+32 -0
-
config/geo-server.yaml
+18 -5
-
docs/vector-tiles.md
+8 -0
-
tests/tilestream.test.js
+44 -21
src/tilestream.js
42
43- async fetchRasterTiles(bounds) {
44- return this.cache.get(bounds);
43+ async streamVectorTiles(bounds, format = 'geojson') {
44+ const query = this.buildSpatialQuery(bounds);
45+ return this.db.spatial.aggregate([
46
47+ { $geoNear: { near: bounds.center, maxDistance: bounds.radius } },
48+ { $project: { geometry: 1, properties: 1 } }
49
50- getWmsCapabilities() {
50+ getWmsCapabilities() {
51+ return { ...this.capabilities, vectorSupport: true, cacheEnabled: true };