Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created January 23, 2024 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/ab220612e3789ab9e776e0815654a170 to your computer and use it in GitHub Desktop.
Save tmcw/ab220612e3789ab9e776e0815654a170 to your computer and use it in GitHub Desktop.

These are the two main commits used to transition part of Placemark to Deck.gl. It may make sense to reverse these: Deck caused some bugs, and while the performance was a little better, there was no way to transition fully.

diff --git a/app/lib/__snapshots__/load_and_augment_style.test.ts.snap b/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
index f4162bda7..7ce3be461 100644
--- a/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
+++ b/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
@@ -15,24 +15,6 @@ Object {
"source": "placemarkInternalSource1",
"type": "raster",
},
- Object {
- "id": "lasso-fill",
- "paint": Object {
- "fill-color": "#FDE68A",
- "fill-opacity": 0.2,
- },
- "source": "lasso",
- "type": "fill",
- },
- Object {
- "id": "lasso-line",
- "paint": Object {
- "line-color": "#F59E0B",
- "line-width": 1,
- },
- "source": "lasso",
- "type": "line",
- },
Object {
"filter": Array [
"==",
@@ -310,15 +292,6 @@ Object {
"tolerance": 0,
"type": "geojson",
},
- "lasso": Object {
- "buffer": 512,
- "data": Object {
- "features": Array [],
- "type": "FeatureCollection",
- },
- "tolerance": 0,
- "type": "geojson",
- },
"placemarkInternalSource1": Object {
"scheme": "tms",
"tileSize": 256,
@@ -462,24 +435,6 @@ Array [
exports[`makeLayers categorical 2`] = `
Array [
- Object {
- "id": "lasso-fill",
- "paint": Object {
- "fill-color": "#FDE68A",
- "fill-opacity": 0.2,
- },
- "source": "lasso",
- "type": "fill",
- },
- Object {
- "id": "lasso-line",
- "paint": Object {
- "line-color": "#F59E0B",
- "line-width": 1,
- },
- "source": "lasso",
- "type": "line",
- },
Object {
"filter": Array [
"==",
@@ -964,24 +919,6 @@ Array [
exports[`makeLayers none 1`] = `
Array [
- Object {
- "id": "lasso-fill",
- "paint": Object {
- "fill-color": "#FDE68A",
- "fill-opacity": 0.2,
- },
- "source": "lasso",
- "type": "fill",
- },
- Object {
- "id": "lasso-line",
- "paint": Object {
- "line-color": "#F59E0B",
- "line-width": 1,
- },
- "source": "lasso",
- "type": "line",
- },
Object {
"filter": Array [
"==",
@@ -1243,24 +1180,6 @@ Array [
exports[`makeLayers ramp 1`] = `
Array [
- Object {
- "id": "lasso-fill",
- "paint": Object {
- "fill-color": "#FDE68A",
- "fill-opacity": 0.2,
- },
- "source": "lasso",
- "type": "fill",
- },
- Object {
- "id": "lasso-line",
- "paint": Object {
- "line-color": "#F59E0B",
- "line-width": 1,
- },
- "source": "lasso",
- "type": "line",
- },
Object {
"filter": Array [
"==",
@@ -1889,24 +1808,6 @@ Array [
exports[`makeLayers with preview property 1`] = `
Array [
- Object {
- "id": "lasso-fill",
- "paint": Object {
- "fill-color": "#FDE68A",
- "fill-opacity": 0.2,
- },
- "source": "lasso",
- "type": "fill",
- },
- Object {
- "id": "lasso-line",
- "paint": Object {
- "line-color": "#F59E0B",
- "line-width": 1,
- },
- "source": "lasso",
- "type": "line",
- },
Object {
"filter": Array [
"==",
diff --git a/app/lib/color.ts b/app/lib/color.ts
index 6b2c01f81..9449f9db6 100644
--- a/app/lib/color.ts
+++ b/app/lib/color.ts
@@ -1,5 +1,21 @@
import randomColor from "randomcolor";
import type { IPresence, RampValues } from "types";
+import * as d3 from "d3-color";
+import { purple900a } from "app/lib/constants";
+
+/**
+ * Always returns a color triplet.
+ * Will return purple900 if the color can't be parsed.
+ */
+export function hexToArray(color: string, alpha?: number): RGBA {
+ const c = d3.color(color);
+ if (!c) {
+ return purple900a;
+ }
+ const rgb = c.rgb();
+ const opacity = alpha === undefined ? rgb.opacity : alpha;
+ return [rgb.r, rgb.g, rgb.b, Math.floor(opacity * 255)];
+}
export function colorFromPresence(presence: IPresence) {
return randomColor({ seed: presence.userId * 10, luminosity: "dark" });
diff --git a/app/lib/constants.ts b/app/lib/constants.ts
index 8be21e8a6..09f763fa1 100644
--- a/app/lib/constants.ts
+++ b/app/lib/constants.ts
@@ -1,6 +1,7 @@
import type { IFeatureCollection, GeoJSON, Geometry } from "types";
import { env } from "app/lib/env_client";
import { z } from "zod";
+import { hexToArray } from "app/lib/color";
type GeoJSONTypeList = GeoJSON["type"][];
type GeometryTypeList = Geometry["type"][];
@@ -250,3 +251,19 @@ export const FILE_LIMIT_BYTES = FILE_LIMIT_MB * MB_TO_BYTES;
export const SCALE_UNITS = ["imperial", "metric", "nautical"] as const;
export type ScaleUnit = typeof SCALE_UNITS[number];
export const zScaleUnit = z.enum(SCALE_UNITS);
+
+export const purple900 = "#312E81";
+export const purple900a: RGBA = [49, 46, 129, 255];
+
+export const WHITE: RGBA = [255, 255, 255, 255];
+
+export const LINE_COLORS = {
+ idle: "#8B5CF6",
+ selected: "#D6409F",
+} as const;
+
+export const LINE_IDLE = hexToArray(LINE_COLORS.idle);
+export const LINE_SELECTED = hexToArray(LINE_COLORS.selected);
+
+export const LASSO_YELLOW = hexToArray("#FDE68A55");
+export const LASSO_DARK_YELLOW = hexToArray("#F59E0B");
diff --git a/app/lib/load_and_augment_style.ts b/app/lib/load_and_augment_style.ts
index 458455e42..ecb243b53 100644
--- a/app/lib/load_and_augment_style.ts
+++ b/app/lib/load_and_augment_style.ts
@@ -38,24 +38,10 @@ const LINE_COLORS = {
selected: "#D6409F",
} as const;
-const YELLOW = "#FDE68A";
-const DARK_YELLOW = "#F59E0B";
-
const CIRCLE_LAYOUT: mapboxgl.CircleLayout = {};
-const LASSO_PAINT: mapboxgl.FillPaint = {
- "fill-opacity": 0.2,
- "fill-color": YELLOW,
-};
-
-const LASSO_LINE_PAINT: mapboxgl.LinePaint = {
- "line-width": 1,
- "line-color": DARK_YELLOW,
-};
-
export const FEATURES_SOURCE_NAME = "features";
export const SYNTHETIC_SOURCE_NAME = "synthetic";
-export const LASSO_SOURCE_NAME = "lasso";
export const EPHEMERAL_SOURCE_NAME = "ephemeral";
export const EPHEMERAL_LINE_LAYER_NAME = "ephemeral-line";
@@ -70,8 +56,6 @@ export const FEATURES_LINE = "features-label";
export const CURSORS_POINT_LAYER_NAME = "cursors-symbol";
export const FEATURES_LINE_LAYER_NAME = "features-line";
export const FEATURES_FILL_LAYER_NAME = "features-fill";
-export const LASSO_FILL_LAYER_NAME = "lasso-fill";
-export const LASSO_LINE_LAYER_NAME = "lasso-line";
export const VERTEX_LAYER_NAME = "vertex";
const emptyGeoJSONSource = {
@@ -257,7 +241,6 @@ export function addEditingLayers({
style.sources[FEATURES_SOURCE_NAME] = emptyGeoJSONSource;
style.sources[SYNTHETIC_SOURCE_NAME] = emptyGeoJSONSource;
style.sources[EPHEMERAL_SOURCE_NAME] = emptyGeoJSONSource;
- style.sources[LASSO_SOURCE_NAME] = emptyGeoJSONSource;
if (!style.layers) {
throw new Error("Style unexpectedly had no layers");
@@ -277,20 +260,6 @@ export function makeLayers({
}): mapboxgl.AnyLayer[] {
return [
// Real polygons, from the dataset.
- {
- id: LASSO_FILL_LAYER_NAME,
- type: "fill",
- source: LASSO_SOURCE_NAME,
- paint: LASSO_PAINT,
- },
-
- {
- id: LASSO_LINE_LAYER_NAME,
- type: "line",
- source: LASSO_SOURCE_NAME,
- paint: LASSO_LINE_PAINT,
- },
-
{
id: FEATURES_FILL_LAYER_NAME,
type: "fill",
diff --git a/app/lib/pmap/index.ts b/app/lib/pmap/index.ts
index 0e4f27a3d..37a583a37 100644
--- a/app/lib/pmap/index.ts
+++ b/app/lib/pmap/index.ts
@@ -3,9 +3,6 @@ import loadAndAugmentStyle, {
FEATURES_SOURCE_NAME,
SYNTHETIC_SOURCE_NAME,
EPHEMERAL_SOURCE_NAME,
- LASSO_SOURCE_NAME,
- LASSO_FILL_LAYER_NAME,
- LASSO_LINE_LAYER_NAME,
} from "app/lib/load_and_augment_style";
import type {
EphemeralEditingState,
@@ -17,6 +14,8 @@ import {
CURSOR_DEFAULT,
DEFAULT_MAP_BOUNDS,
emptySelection,
+ LASSO_YELLOW,
+ LASSO_DARK_YELLOW,
} from "app/lib/constants";
import { splitFeatureGroups } from "app/lib/pmap/split_feature_groups";
import type {
@@ -31,6 +30,8 @@ import { colorFromPresence } from "app/lib/color";
import type { Presence } from "db";
import { IDMap } from "app/lib/id_mapper";
import { shallowArrayEqual } from "app/lib/utils";
+import { MapboxOverlay } from "@deck.gl/mapbox/typed";
+import { PolygonLayer } from "@deck.gl/layers/typed";
const MAP_OPTIONS: Omit<mapboxgl.MapboxOptions, "container"> = {
style: { version: 8, layers: [], sources: {} },
@@ -109,6 +110,7 @@ export default class PMap {
presenceMarkers: Map<IPresence["userId"], mapboxgl.Marker>;
lastLayer: LayerConfigMap | null;
lastPreviewProperty: PreviewProperty;
+ overlay: MapboxOverlay;
constructor({
element,
@@ -154,6 +156,13 @@ export default class PMap {
...positionOptions,
});
+ this.overlay = new MapboxOverlay({
+ interleaved: true,
+ layers: [],
+ });
+
+ map.addControl(this.overlay);
+
map.addControl(
new mapboxgl.GeolocateControl({
showUserLocation: false,
@@ -295,10 +304,6 @@ export default class PMap {
SYNTHETIC_SOURCE_NAME
) as mapboxgl.GeoJSONSource;
- const lassoSource = this.map.getSource(
- LASSO_SOURCE_NAME
- ) as mapboxgl.GeoJSONSource;
-
if (!featuresSource || !syntheticSource || !ephemeralSource) {
// Set the lastFeatureList here
// so that the setStyle method will
@@ -327,20 +332,26 @@ export default class PMap {
mSetData(featuresSource, groups.features, "features", force);
mSetData(syntheticSource, groups.synthetic, "synth");
- switch (ephemeralState.type) {
- case "lasso": {
- if (lassoSource) {
- const rect = makeRectangle(ephemeralState);
- this.setLassoVisibility("visible");
- lassoSource.setData(rect);
- }
- break;
- }
- case "none": {
- this.setLassoVisibility("none");
- break;
- }
- }
+ this.overlay.setProps({
+ layers: [
+ ephemeralState.type === "lasso" &&
+ new PolygonLayer({
+ id: "deckgl-lasso",
+ data: [makeRectangle(ephemeralState)],
+ visible: ephemeralState.type === "lasso",
+ pickable: false,
+ stroked: true,
+ filled: true,
+ lineWidthScale: 2,
+ lineWidthMinPixels: 2,
+ lineWidthUnits: "pixels",
+ getPolygon: (d) => d,
+ getFillColor: LASSO_YELLOW,
+ getLineColor: LASSO_DARK_YELLOW,
+ getLineWidth: 1,
+ }),
+ ],
+ });
this.lastData = data;
this.updateSelections(groups.selectionIds);
@@ -454,18 +465,4 @@ export default class PMap {
this.lastSelectionIds = newSet;
}
-
- /**
- * Show or hide the lasso layer using a visibility property.
- */
- private setLassoVisibility(visibility: "none" | "visible") {
- if (!this.map) return;
- try {
- for (const id of [LASSO_FILL_LAYER_NAME, LASSO_LINE_LAYER_NAME]) {
- this.map.setLayoutProperty(id, "visibility", visibility);
- }
- } catch (e) {
- console.warn("Failed to set lasso");
- }
- }
}
diff --git a/app/lib/pmap/merge_ephemeral_state.server.test.ts b/app/lib/pmap/merge_ephemeral_state.server.test.ts
index bdfe6cd74..0403554f2 100644
--- a/app/lib/pmap/merge_ephemeral_state.server.test.ts
+++ b/app/lib/pmap/merge_ephemeral_state.server.test.ts
@@ -8,40 +8,27 @@ test("makeRectangle", () => {
[0, 0],
[10, 10],
],
+
type: "lasso",
})
).toMatchInlineSnapshot(`
- Object {
- "geometry": Object {
- "coordinates": Array [
- Array [
- Array [
- 0,
- 0,
- ],
- Array [
- 0,
- 10,
- ],
- Array [
- 10,
- 10,
- ],
- Array [
- 10,
- 0,
- ],
- Array [
- 0,
- 0,
- ],
- ],
- ],
- "type": "Polygon",
- },
- "properties": null,
- "type": "Feature",
- }
+ Array [
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 0,
+ 10,
+ 10,
+ 0,
+ 10,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ ]
`);
});
diff --git a/app/lib/pmap/merge_ephemeral_state.ts b/app/lib/pmap/merge_ephemeral_state.ts
index 0017fda03..c1214eb80 100644
--- a/app/lib/pmap/merge_ephemeral_state.ts
+++ b/app/lib/pmap/merge_ephemeral_state.ts
@@ -1,27 +1,10 @@
-import type { IFeature, Feature, Polygon, LineString } from "types";
-import { polygonCoordinatesFromPositions } from "app/lib/geometry";
+import type { IFeature, Feature, LineString } from "types";
import type { EphemeralEditingStateLasso } from "state/jotai";
-/**
- * Experimental performance trick: reserve these
- * objects, which otherwise would be regenerated and cause
- * memory churn, and reuse them.
- */
-const lassoHolder: IFeature<Polygon> = {
- type: "Feature",
- properties: null,
- geometry: {
- type: "Polygon",
- coordinates: [],
- },
-};
-
-export function makeRectangle(
- ephemeralState: EphemeralEditingStateLasso
-): IFeature<Polygon> {
+export function makeRectangle(ephemeralState: EphemeralEditingStateLasso) {
const [a, b] = ephemeralState.box;
- lassoHolder.geometry.coordinates = polygonCoordinatesFromPositions(a, b);
- return lassoHolder;
+ // X, Y, Z format for deck's flattened arrays
+ return [...a, 0, a[0], b[1], 0, ...b, 0, b[0], a[1], 0, ...a, 0];
}
export function fixDegenerates(feature: Feature) {
diff --git a/package.json b/package.json
index 484b75b9f..1b713faec 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,9 @@
"@codemirror/lint": "^6.0.0",
"@codemirror/state": "^6.1.1",
"@codemirror/view": "^6.2.1",
+ "@deck.gl/core": "^8.8.14",
+ "@deck.gl/layers": "^8.8.14",
+ "@deck.gl/mapbox": "^8.8.14",
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/modifiers": "^6.0.0",
"@dnd-kit/sortable": "^7.0.1",
diff --git a/types/globals.d.ts b/types/globals.d.ts
index e5451e150..ab5c33ca9 100644
--- a/types/globals.d.ts
+++ b/types/globals.d.ts
@@ -5,6 +5,7 @@ type Opaque<Type, Token = unknown> = Type & { readonly __opaque__: Token };
type BBox4 = [number, number, number, number];
type Pos2 = [number, number];
+type RGBA = [number, number, number, number];
type VertexId = {
type: "vertex";
diff --git a/yarn.lock b/yarn.lock
index afd677d39..d70cc2a3a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1808,7 +1808,7 @@
core-js-pure "^3.25.1"
regenerator-runtime "^0.13.4"
-"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
+"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.19.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.4.tgz#a42f814502ee467d55b38dd1c256f53a7b885c78"
integrity sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==
@@ -2057,6 +2057,46 @@
debug "^3.1.0"
lodash.once "^4.1.1"
+"@deck.gl/core@^8.8.14":
+ version "8.8.14"
+ resolved "https://registry.yarnpkg.com/@deck.gl/core/-/core-8.8.14.tgz#d9995b6b1f926f71f000296763e523cf791ff4bd"
+ integrity sha512-sWunaQu6nZTB+q3wF7STe93SFlpiCQgeLdhbLFLPPLLc/DQlNVyFaildGRH2kH4J2eu5rKc3bbgPtTqm74Xtzg==
+ dependencies:
+ "@loaders.gl/core" "^3.2.5"
+ "@loaders.gl/images" "^3.2.5"
+ "@luma.gl/constants" "^8.5.16"
+ "@luma.gl/core" "^8.5.16"
+ "@math.gl/core" "^3.6.2"
+ "@math.gl/sun" "^3.6.2"
+ "@math.gl/web-mercator" "^3.6.2"
+ "@probe.gl/env" "^3.5.0"
+ "@probe.gl/log" "^3.5.0"
+ "@probe.gl/stats" "^3.5.0"
+ gl-matrix "^3.0.0"
+ math.gl "^3.6.2"
+ mjolnir.js "^2.7.0"
+
+"@deck.gl/layers@^8.8.14":
+ version "8.8.14"
+ resolved "https://registry.yarnpkg.com/@deck.gl/layers/-/layers-8.8.14.tgz#814b86a8657b6b5f88ba08035c2fabafea1b6a5f"
+ integrity sha512-ci0worwyNCpSS5SG0Q/GtS9PfH9rM1GHE1g69ee2faP9YmzIWnzja4zKV+5mrO56FBh66DiI+N6axxPqHilUgQ==
+ dependencies:
+ "@loaders.gl/images" "^3.2.5"
+ "@loaders.gl/schema" "^3.2.5"
+ "@luma.gl/constants" "^8.5.16"
+ "@mapbox/tiny-sdf" "^1.1.0"
+ "@math.gl/core" "^3.6.2"
+ "@math.gl/polygon" "^3.6.2"
+ "@math.gl/web-mercator" "^3.6.2"
+ earcut "^2.0.6"
+
+"@deck.gl/mapbox@^8.8.14":
+ version "8.8.14"
+ resolved "https://registry.yarnpkg.com/@deck.gl/mapbox/-/mapbox-8.8.14.tgz#d21f64a30bd211a3f1c2adf3c4d3ffd1902b1696"
+ integrity sha512-WWKykgsqZJK8icyW4s1/1YUDbVr7VqoWA4/jfjjQzpriWrmNDFlKyJu+AeN43XEDDLTwT4+vNjVtRRKyrWJD/A==
+ dependencies:
+ "@types/mapbox-gl" "^2.6.3"
+
"@dnd-kit/accessibility@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@dnd-kit/accessibility/-/accessibility-3.0.1.tgz#3ccbefdfca595b0a23a5dc57d3de96bc6935641c"
@@ -2487,6 +2527,48 @@
dependencies:
"@lezer/common" "^1.0.0"
+"@loaders.gl/core@^3.2.5":
+ version "3.2.10"
+ resolved "https://registry.yarnpkg.com/@loaders.gl/core/-/core-3.2.10.tgz#793e5f839fa8a919f8272641ba9893929acc751f"
+ integrity sha512-t/WTJh25d5WdzW+xleMGjDUuZwfevEPjlhdtGGqEh8fx6uhj/yZDxrXbP4O+QezIuo9v1fJ1JOGh8UDw97N11w==
+ dependencies:
+ "@babel/runtime" "^7.3.1"
+ "@loaders.gl/loader-utils" "3.2.10"
+ "@loaders.gl/worker-utils" "3.2.10"
+ "@probe.gl/log" "^3.5.0"
+ probe.gl "^3.4.0"
+
+"@loaders.gl/images@^3.2.5":
+ version "3.2.10"
+ resolved "https://registry.yarnpkg.com/@loaders.gl/images/-/images-3.2.10.tgz#7e41ef755e0737428c6c60b199a4741219a661fb"
+ integrity sha512-GsGl6c83Qd2nitVjoGtcIUPsg6vkfrLyaJyc/1UJUGoWOvk3DHBrcaSO/ld5bnWxjImUP6enwV5rmw6NylXU0Q==
+ dependencies:
+ "@loaders.gl/loader-utils" "3.2.10"
+
+"@loaders.gl/loader-utils@3.2.10":
+ version "3.2.10"
+ resolved "https://registry.yarnpkg.com/@loaders.gl/loader-utils/-/loader-utils-3.2.10.tgz#2fb644cbe4a890492030fd4270da005bae2d88a1"
+ integrity sha512-oCxYRN1j93zgu3klByFN4fYCSMdhaZodHtDKvG4VEqTmDWFT3jbFpDkBmjwFseEmHQRirt52vwZSknvIUTSXBQ==
+ dependencies:
+ "@babel/runtime" "^7.3.1"
+ "@loaders.gl/worker-utils" "3.2.10"
+ "@probe.gl/stats" "^3.5.0"
+
+"@loaders.gl/schema@^3.2.5":
+ version "3.2.10"
+ resolved "https://registry.yarnpkg.com/@loaders.gl/schema/-/schema-3.2.10.tgz#3febcc34b03615b7e5f1162d47ba49ab8ac81faf"
+ integrity sha512-TeM/E2JBzoLbs/wuljYAEYAXFgiBomshjUIIlbgKTSjM+m13VrMvs1jgRLWJ1kicqiCxENHLQDnK/Zl3hBc0iQ==
+ dependencies:
+ "@types/geojson" "^7946.0.7"
+ apache-arrow "^4.0.0"
+
+"@loaders.gl/worker-utils@3.2.10":
+ version "3.2.10"
+ resolved "https://registry.yarnpkg.com/@loaders.gl/worker-utils/-/worker-utils-3.2.10.tgz#cf4d1308b69cca3e8dea6ef02548333b840edf22"
+ integrity sha512-z75rIsddAGeMV8u1O0jsq1+BGgTYxFHTx6rhmPfOLGQhiZg6bEF2dFSr/mpkUd0xJyyV+Z67+jcC8RUTb1sOTA==
+ dependencies:
+ "@babel/runtime" "^7.3.1"
+
"@logtail/core@^0.1.12":
version "0.1.12"
resolved "https://registry.yarnpkg.com/@logtail/core/-/core-0.1.12.tgz#e5b4ffefbcee82b2a3b60623d23399440a68d61d"
@@ -2522,6 +2604,68 @@
dependencies:
js "^0.1.0"
+"@luma.gl/constants@8.5.17", "@luma.gl/constants@^8.5.16":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/constants/-/constants-8.5.17.tgz#f7ef1cb7000108d6030232db92f0735643004815"
+ integrity sha512-8jD2aDgFa04HtWuj5ZyZm4h+hz2HI+1gcrab4uQp3qq75iAQXg62Tu68mTcoL8xWehmJntNCkLbnkkuTdFsOAQ==
+
+"@luma.gl/core@^8.5.16":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/core/-/core-8.5.17.tgz#44131b79d8904a5188f2259def375a3edd3e8575"
+ integrity sha512-bvnySRyyRFkxEg9rmgyC4HWQmakIMax43RMbn9cEma9A8VnHwQ252nGAJhKzz07kg+70jTiNlXogWvNKGlIc1w==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@luma.gl/constants" "8.5.17"
+ "@luma.gl/engine" "8.5.17"
+ "@luma.gl/gltools" "8.5.17"
+ "@luma.gl/shadertools" "8.5.17"
+ "@luma.gl/webgl" "8.5.17"
+
+"@luma.gl/engine@8.5.17":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/engine/-/engine-8.5.17.tgz#86d9b9594b9c45544db1f38475f9b2488d15faba"
+ integrity sha512-XyYYBUKj23P6e9VH+vJ7vEZe/5IH80DZkst4qQABJIBAXg/0dUf2QxST5PNbokOT4SrmuM5As5a2QUrmcUmGiw==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@luma.gl/constants" "8.5.17"
+ "@luma.gl/gltools" "8.5.17"
+ "@luma.gl/shadertools" "8.5.17"
+ "@luma.gl/webgl" "8.5.17"
+ "@math.gl/core" "^3.5.0"
+ "@probe.gl/env" "^3.5.0"
+ "@probe.gl/stats" "^3.5.0"
+ "@types/offscreencanvas" "^2019.7.0"
+
+"@luma.gl/gltools@8.5.17":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/gltools/-/gltools-8.5.17.tgz#5e5d55b3771a80d917f4d0862d780f8d8d1d24ac"
+ integrity sha512-ikrhwDcTBxxHFRvpCYFjm0HW9l2G2tueD4BV2UpWIl4u8rVTCG98nkypymU8HvF2W6zdvrOwna7Ha2vG4egX1Q==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@luma.gl/constants" "8.5.17"
+ "@probe.gl/env" "^3.5.0"
+ "@probe.gl/log" "^3.5.0"
+ "@types/offscreencanvas" "^2019.7.0"
+
+"@luma.gl/shadertools@8.5.17":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/shadertools/-/shadertools-8.5.17.tgz#aceae9c4f1961c2906012cd4afe1ff8196acd0d9"
+ integrity sha512-lpCjdutWx3i8qeroH9jPCGyCFvLguLaccQ0d7PCLeFD2eQrN/KuDzgka2V3PHgW1M9Wjph+c0RlaFc6NOuRokQ==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@math.gl/core" "^3.5.0"
+
+"@luma.gl/webgl@8.5.17":
+ version "8.5.17"
+ resolved "https://registry.yarnpkg.com/@luma.gl/webgl/-/webgl-8.5.17.tgz#eaa7d60b4e16dcc6ed72b562a2e9d1dc3a12d2ff"
+ integrity sha512-z9uzRO7i1Y5i3D729x+eE1EjistEn1Ni3S+3RMJEHx6zPfs3WyiDc20B1ul+wk6vX0ukQWihLGCF6AIRdenktA==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@luma.gl/constants" "8.5.17"
+ "@luma.gl/gltools" "8.5.17"
+ "@probe.gl/env" "^3.5.0"
+ "@probe.gl/stats" "^3.5.0"
+
"@mapbox/geojson-rewind@0.5.2", "@mapbox/geojson-rewind@^0.5.1":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz#591a5d71a9cd1da1a0bf3420b3bea31b0fc7946a"
@@ -2564,6 +2708,11 @@
resolved "https://registry.yarnpkg.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz#8a83f9335c7860effa2eeeca254332aa0aeed8f2"
integrity sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==
+"@mapbox/tiny-sdf@^1.1.0":
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-1.2.5.tgz#424c620a96442b20402552be70a7f62a8407cc59"
+ integrity sha512-cD8A/zJlm6fdJOk6DqPUV8mcpyJkRz2x2R+/fYcWDYG3oWbG7/L7Yl/WqQ1VZCjnL9OTIMAn6c+BC5Eru4sQEw==
+
"@mapbox/tiny-sdf@^2.0.5":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz#cdba698d3d65087643130f9af43a2b622ce0b372"
@@ -2586,6 +2735,42 @@
resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe"
integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==
+"@math.gl/core@3.6.3", "@math.gl/core@^3.5.0", "@math.gl/core@^3.6.2":
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/@math.gl/core/-/core-3.6.3.tgz#a6bf796ed421093099749d609de8d99a3ac20a53"
+ integrity sha512-jBABmDkj5uuuE0dTDmwwss7Cup5ZwQ6Qb7h1pgvtkEutTrhkcv8SuItQNXmF45494yIHeoGue08NlyeY6wxq2A==
+ dependencies:
+ "@babel/runtime" "^7.12.0"
+ "@math.gl/types" "3.6.3"
+ gl-matrix "^3.4.0"
+
+"@math.gl/polygon@^3.6.2":
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/@math.gl/polygon/-/polygon-3.6.3.tgz#0c19c0b059cedde1cd760cc3796e9180f75bcbde"
+ integrity sha512-FivQ1ZnYcAss1wVifOkHP/ZnlfQy1IL/769uzNtiHxwUbW0kZG3yyOZ9I7fwyzR5Hvqt3ErJKHjSYZr0uVlz5g==
+ dependencies:
+ "@math.gl/core" "3.6.3"
+
+"@math.gl/sun@^3.6.2":
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/@math.gl/sun/-/sun-3.6.3.tgz#30c15612313b56349c568f21f39c0e0f0e77b2df"
+ integrity sha512-mrx6CGYYeTNSQttvcw0KVUy+35YDmnjMqpO/o0t06Vcghrt0HNruB/ScRgUSbJrgkbOg1Vcqm23HBd++clzQzw==
+ dependencies:
+ "@babel/runtime" "^7.12.0"
+
+"@math.gl/types@3.6.3":
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/@math.gl/types/-/types-3.6.3.tgz#9fa9866feabcbb76de107d78ff3a89c0243ac374"
+ integrity sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA==
+
+"@math.gl/web-mercator@^3.6.2":
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/@math.gl/web-mercator/-/web-mercator-3.6.3.tgz#ef91168e030eecffc788618d686e8a6c1d7a0bf8"
+ integrity sha512-UVrkSOs02YLehKaehrxhAejYMurehIHPfFQvPFZmdJHglHOU4V2cCUApTVEwOksvCp161ypEqVp+9H6mGhTTcw==
+ dependencies:
+ "@babel/runtime" "^7.12.0"
+ gl-matrix "^3.4.0"
+
"@mrleebo/prisma-ast@0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@mrleebo/prisma-ast/-/prisma-ast-0.2.6.tgz#654129c51fd0bcde4ab9be687e373bf8c3dd5a59"
@@ -2917,6 +3102,28 @@
resolved "https://registry.yarnpkg.com/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6.tgz#d0ab2f4bac76da2767e242ced74b4257e839befe"
integrity sha512-Hc2i5nfAt3nLDUkQNWJcKFJaA9Avd5zz6t85w9SW7P0vGtFXScQ+xIu6znbULr9bc0pgTWejY1We2u/7EMxHWw==
+"@probe.gl/env@3.5.2", "@probe.gl/env@^3.5.0":
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/@probe.gl/env/-/env-3.5.2.tgz#f5639d5686235afb165f353675efea26766f8555"
+ integrity sha512-JlNvJ2p6+ObWX7es6n3TycGPTv5CfVrCS8vblI1eHhrFCcZ6RxIo727ffRVwldpp0YTzdgjx3/4fB/1dnVYElw==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+
+"@probe.gl/log@3.5.2", "@probe.gl/log@^3.5.0":
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/@probe.gl/log/-/log-3.5.2.tgz#e33103f6151c30431c4bfe63f1341bc0d9febe94"
+ integrity sha512-5yo8Dg8LrSltuPBdGlLh/WOvt4LdU7DDHu75GMeiS0fKM+J4IACRpGV8SOrktCj1MWZ6JVHcNQkJnoyZ6G7p/w==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@probe.gl/env" "3.5.2"
+
+"@probe.gl/stats@3.5.2", "@probe.gl/stats@^3.5.0":
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/@probe.gl/stats/-/stats-3.5.2.tgz#8ee41f73199182fddb8e40221da967414eaea619"
+ integrity sha512-YKaYXiHF//fgy1OkX38JD70Lc8qxg2Viw8Q2CTNMwGPDJe12wda7kEmMKPJNw2oYLyFUfTzv00KJMA5h18z02w==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+
"@radix-ui/number@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.0.0.tgz#4c536161d0de750b3f5d55860fc3de46264f897b"
@@ -4155,12 +4362,17 @@
"@types/qs" "*"
"@types/serve-static" "*"
+"@types/flatbuffers@^1.10.0":
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/@types/flatbuffers/-/flatbuffers-1.10.0.tgz#aa74e30ffdc86445f2f060e1808fc9d56b5603ba"
+ integrity sha512-7btbphLrKvo5yl/5CC2OCxUSMx1wV1wvGT1qDXkSt7yi00/YW7E8k6qzXqJHsp+WU0eoG7r6MTQQXI9lIvd0qA==
+
"@types/flatbush@^3.3.0":
version "3.3.0"
resolved "https://registry.yarnpkg.com/@types/flatbush/-/flatbush-3.3.0.tgz#bd0ecc24e202ff095e3344bf48486e272e61e406"
integrity sha512-fSPSZ1d5v3DaAmWhuoFSCeaFA7JHdtcvF5F2Pdo0cAdrV4aRl9tCcKl1BuV7/QYWLN/vyefPGrsUHMGGtq6ASQ==
-"@types/geojson@*", "@types/geojson@^7946.0", "@types/geojson@^7946.0.10":
+"@types/geojson@*", "@types/geojson@^7946.0", "@types/geojson@^7946.0.10", "@types/geojson@^7946.0.7":
version "7946.0.10"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249"
integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==
@@ -4177,6 +4389,11 @@
dependencies:
"@types/node" "*"
+"@types/hammerjs@^2.0.41":
+ version "2.0.41"
+ resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa"
+ integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==
+
"@types/hoist-non-react-statics@3.3.1":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
@@ -4252,7 +4469,7 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.186.tgz#862e5514dd7bd66ada6c70ee5fce844b06c8ee97"
integrity sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==
-"@types/mapbox-gl@^2.7.5":
+"@types/mapbox-gl@^2.6.3", "@types/mapbox-gl@^2.7.5":
version "2.7.6"
resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-2.7.6.tgz#87edd38d9ac4b72be5e293472488a2e21910ad58"
integrity sha512-EPIfNO7WApXaFM7DuJBj+kpXmqffqJHMJ3Q9gbV/nNL23XHR0PC5CCDYbAFa4tKErm0xJd9C5kPLF6KvA/cRcA==
@@ -4274,7 +4491,7 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.4.tgz#7017a52e18dfaad32f55eebd539993014441949c"
integrity sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==
-"@types/node@^14.14.31":
+"@types/node@^14.14.31", "@types/node@^14.14.37":
version "14.18.32"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.32.tgz#8074f7106731f1a12ba993fe8bad86ee73905014"
integrity sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow==
@@ -4286,6 +4503,11 @@
dependencies:
"@types/node" "*"
+"@types/offscreencanvas@^2019.7.0":
+ version "2019.7.0"
+ resolved "https://registry.yarnpkg.com/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz#e4a932069db47bb3eabeb0b305502d01586fa90d"
+ integrity sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==
+
"@types/passport@1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@types/passport/-/passport-1.0.7.tgz#85892f14932168158c86aecafd06b12f5439467a"
@@ -4436,6 +4658,11 @@
dependencies:
"@types/jest" "*"
+"@types/text-encoding-utf-8@^1.0.1":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@types/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#896e94ce99b653e886a9b925e9dc12c92af7b1ae"
+ integrity sha512-AQ6zewa0ucLJvtUi5HsErbOFKAcQfRLt9zFLlUOvcXBy2G36a+ZDpCHSGdzJVUD8aNURtIjh9aSjCStNMRCcRQ==
+
"@types/topojson-client@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@types/topojson-client/-/topojson-client-3.1.1.tgz#d1396b2e79f530ef69bb162523cddf94576bd5a9"
@@ -4766,6 +4993,22 @@ anymatch@^3.0.3, anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"
+apache-arrow@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/apache-arrow/-/apache-arrow-4.0.1.tgz#62e58caa46a6a41966478a19c492380c9efb1d66"
+ integrity sha512-DyF7GXCbSjsw4P5C8b+qW7OnJKa6w9mJI0mhV0+EfZbVZCmhfiF6ffqcnrI/kzBrRqn9hH/Ft9n5+m4DTbBJpg==
+ dependencies:
+ "@types/flatbuffers" "^1.10.0"
+ "@types/node" "^14.14.37"
+ "@types/text-encoding-utf-8" "^1.0.1"
+ command-line-args "5.1.1"
+ command-line-usage "6.1.1"
+ flatbuffers "1.12.0"
+ json-bignum "^0.0.3"
+ pad-left "^2.1.0"
+ text-encoding-utf-8 "^1.0.2"
+ tslib "^2.2.0"
+
aproba@^1.0.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
@@ -4848,6 +5091,16 @@ arr-union@^3.1.0:
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==
+array-back@^3.0.1:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0"
+ integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==
+
+array-back@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e"
+ integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==
+
array-differ@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
@@ -5489,7 +5742,7 @@ chalk@3.0.0, chalk@^3.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
-chalk@^2.0.0:
+chalk@^2.0.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -5792,6 +6045,26 @@ comlink@^4.3.1:
resolved "https://registry.yarnpkg.com/comlink/-/comlink-4.3.1.tgz#0c6b9d69bcd293715c907c33fe8fc45aecad13c5"
integrity sha512-+YbhUdNrpBZggBAHWcgQMLPLH1KDF3wJpeqrCKieWQ8RL7atmgsgTQko1XEBK6PsecfopWNntopJ+ByYG1lRaA==
+command-line-args@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.1.1.tgz#88e793e5bb3ceb30754a86863f0401ac92fd369a"
+ integrity sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==
+ dependencies:
+ array-back "^3.0.1"
+ find-replace "^3.0.0"
+ lodash.camelcase "^4.3.0"
+ typical "^4.0.0"
+
+command-line-usage@6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.1.tgz#c908e28686108917758a49f45efb4f02f76bc03f"
+ integrity sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==
+ dependencies:
+ array-back "^4.0.1"
+ chalk "^2.4.2"
+ table-layout "^1.0.1"
+ typical "^5.2.0"
+
commander@2, commander@^2.19.0, commander@^2.9.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
@@ -6224,7 +6497,7 @@ deep-equal@^2.0.5:
which-collection "^1.0.1"
which-typed-array "^1.1.2"
-deep-extend@^0.6.0:
+deep-extend@^0.6.0, deep-extend@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
@@ -6504,7 +6777,7 @@ duplexer@^0.1.2, duplexer@~0.1.1:
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==
-earcut@^2.2.4:
+earcut@^2.0.6, earcut@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a"
integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==
@@ -7406,6 +7679,13 @@ find-cache-dir@^2.0.0:
make-dir "^2.0.0"
pkg-dir "^3.0.0"
+find-replace@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38"
+ integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==
+ dependencies:
+ array-back "^3.0.1"
+
find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
@@ -7444,6 +7724,11 @@ flat-cache@^3.0.4:
flatted "^3.1.0"
rimraf "^3.0.2"
+flatbuffers@1.12.0:
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/flatbuffers/-/flatbuffers-1.12.0.tgz#72e87d1726cb1b216e839ef02658aa87dcef68aa"
+ integrity sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==
+
flatbuffers@2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/flatbuffers/-/flatbuffers-2.0.6.tgz#3aa3a39d282af9a660b4a0cdd1bb7ad91874abfc"
@@ -7756,7 +8041,7 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"
-gl-matrix@^3.4.3:
+gl-matrix@^3.0.0, gl-matrix@^3.4.0, gl-matrix@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.4.3.tgz#fc1191e8320009fd4d20e9339595c6041ddc22c9"
integrity sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==
@@ -7921,6 +8206,11 @@ gzip-size@^6.0.0:
dependencies:
duplexer "^0.1.2"
+hammerjs@^2.0.8:
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1"
+ integrity sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==
+
has-bigints@^1.0.1, has-bigints@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa"
@@ -9372,6 +9662,11 @@ jsesc@~0.5.0:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==
+json-bignum@^0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/json-bignum/-/json-bignum-0.0.3.tgz#41163b50436c773d82424dbc20ed70db7604b8d7"
+ integrity sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==
+
json-buffer@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
@@ -9713,6 +10008,11 @@ lodash-es@^4.17.21:
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
+lodash.camelcase@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
+ integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==
+
lodash.castarray@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115"
@@ -9945,6 +10245,13 @@ matchmediaquery@^0.3.0:
dependencies:
css-mediaquery "^0.1.2"
+math.gl@^3.6.2:
+ version "3.6.3"
+ resolved "https://registry.yarnpkg.com/math.gl/-/math.gl-3.6.3.tgz#f87e0d24cb33c1a215185ae3a4e16839f1ce6db2"
+ integrity sha512-Yq9CyECvSDox9+5ETi2+x1bGTY5WvGUGL3rJfC4KPoCZAM51MGfrCm6rIn4yOJUVfMPs2a5RwMD+yGS/n1g3gg==
+ dependencies:
+ "@math.gl/core" "3.6.3"
+
mem-fs-editor@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-8.0.0.tgz#cd8402fa009df302656422f71831ccd8e30319e7"
@@ -10119,6 +10426,14 @@ mixin-deep@^1.2.0:
for-in "^1.0.2"
is-extendable "^1.0.1"
+mjolnir.js@^2.7.0:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/mjolnir.js/-/mjolnir.js-2.7.1.tgz#4e12590fe168b377c9c669b9c31aa5a62f8b8460"
+ integrity sha512-72BeUWgTv2cj5aZQKpwL8caNUFhXZ9bDm1hxpNj70XJQ62IBnTZmtv/WPxJvtaVNhzNo+D2U8O6ryNI0zImYcw==
+ dependencies:
+ "@types/hammerjs" "^2.0.41"
+ hammerjs "^2.0.8"
+
mkdirp@^0.5.5:
version "0.5.6"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6"
@@ -10743,6 +11058,13 @@ packet-reader@1.0.0:
resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74"
integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==
+pad-left@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/pad-left/-/pad-left-2.1.0.tgz#16e6a3b2d44a8e138cb0838cc7cb403a4fc9e994"
+ integrity sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==
+ dependencies:
+ repeat-string "^1.5.4"
+
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
@@ -11206,6 +11528,16 @@ prisma@^4:
dependencies:
"@prisma/engines" "4.5.0"
+probe.gl@^3.4.0:
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/probe.gl/-/probe.gl-3.5.2.tgz#d24f84a24678bd7ce005826d4cf2d7221b9c7db8"
+ integrity sha512-8lFQVmi7pMQZkqfj8+VjX4GU9HTkyxgRm5/h/xxA/4/IvZPv3qtP996L+awPwZsrPRKEw99t12SvqEHqSls/sA==
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ "@probe.gl/env" "3.5.2"
+ "@probe.gl/log" "3.5.2"
+ "@probe.gl/stats" "3.5.2"
+
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -11772,6 +12104,11 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"
+reduce-flatten@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"
+ integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==
+
regenerate-unicode-properties@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c"
@@ -11862,7 +12199,7 @@ repeat-element@^1.1.2:
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9"
integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==
-repeat-string@^1.6.1:
+repeat-string@^1.5.4, repeat-string@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==
@@ -12751,6 +13088,16 @@ symbol-tree@^3.2.4:
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
+table-layout@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04"
+ integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==
+ dependencies:
+ array-back "^4.0.1"
+ deep-extend "~0.6.0"
+ typical "^5.2.0"
+ wordwrapjs "^4.0.0"
+
tailwindcss@^3.1.8:
version "3.2.1"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.2.1.tgz#1bd828fff3172489962357f8d531c184080a6786"
@@ -12816,6 +13163,11 @@ test-exclude@^6.0.0:
glob "^7.1.4"
minimatch "^3.0.4"
+text-encoding-utf-8@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13"
+ integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==
+
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
@@ -13062,7 +13414,7 @@ tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.3:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0:
+tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.1, tslib@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
@@ -13171,6 +13523,16 @@ typescript@~4.8:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
+typical@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
+ integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==
+
+typical@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066"
+ integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==
+
uc.micro@^1.0.1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
@@ -13637,6 +13999,14 @@ word@~0.3.0:
resolved "https://registry.yarnpkg.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961"
integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==
+wordwrapjs@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f"
+ integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==
+ dependencies:
+ reduce-flatten "^2.0.0"
+ typical "^5.2.0"
+
wrap-ansi@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
diff --git a/app/components/map_component.tsx b/app/components/map_component.tsx
index 5ad34c3ee..fbce813fa 100644
--- a/app/components/map_component.tsx
+++ b/app/components/map_component.tsx
@@ -31,10 +31,7 @@ import { MapContext } from "app/context/map_context";
import PMap from "app/lib/pmap";
import { EmptyIndex } from "app/lib/generate_flatbush_instance";
import * as CM from "@radix-ui/react-context-menu";
-import {
- CLICKABLE_LAYERS,
- DRAGGABLE_LAYERS_SET,
-} from "app/lib/load_and_augment_style";
+import { CLICKABLE_LAYERS } from "app/lib/load_and_augment_style";
import { env } from "app/lib/env_client";
import { MapContextMenu } from "app/components/map_context_menu";
import { useHandlers } from "app/lib/handlers/index";
@@ -52,6 +49,7 @@ import { fMoment } from "app/lib/persistence/moment";
import { captureException } from "@sentry/nextjs";
import { newFeatureId } from "app/lib/id";
import toast from "react-hot-toast";
+import { DECK_SYNTHETIC_ID } from "app/lib/constants";
mapboxgl.accessToken = env.NEXT_PUBLIC_MAPBOX_TOKEN;
export interface ContextInfo {
@@ -283,13 +281,19 @@ export const MapComponent = memo(function MapComponent({
const features = map.map.queryRenderedFeatures(point, {
layers: CLICKABLE_LAYERS,
});
- setCursor(
- features.length
- ? DRAGGABLE_LAYERS_SET.has(features[0]?.layer?.id)
- ? "move"
- : "pointer"
- : ""
- );
+ try {
+ const syntheticUnderCursor = map.overlay.pickObject({
+ ...point,
+ layerIds: [DECK_SYNTHETIC_ID],
+ });
+ setCursor(
+ syntheticUnderCursor ? "move" : features.length ? "move" : ""
+ );
+ } catch (e) {
+ // Deck can throw here if it's just been initialized
+ // or uninitialized.
+ console.error(e);
+ }
throttledMovePointer();
}
return fastMovePointer;
@@ -308,6 +312,7 @@ export const MapComponent = memo(function MapComponent({
idMap,
userId: currentUser?.id,
selection,
+ pmap: mapRef.current!,
rep,
};
diff --git a/app/components/map_component_public.tsx b/app/components/map_component_public.tsx
index 0fd7762ca..9192f47ac 100644
--- a/app/components/map_component_public.tsx
+++ b/app/components/map_component_public.tsx
@@ -25,10 +25,7 @@ import {
import { MapContext } from "app/context/map_context";
import PMap from "app/lib/pmap";
import { EmptyIndex } from "app/lib/generate_flatbush_instance";
-import {
- CLICKABLE_LAYERS,
- DRAGGABLE_LAYERS_SET,
-} from "app/lib/load_and_augment_style";
+import { CLICKABLE_LAYERS } from "app/lib/load_and_augment_style";
import { env } from "app/lib/env_client";
import { useHandlers } from "app/lib/handlers/index";
import "mapbox-gl/dist/mapbox-gl.css";
@@ -148,11 +145,7 @@ export const MapComponentPublic = memo(function MapComponent({
const features = map.map.queryRenderedFeatures(point, {
layers: CLICKABLE_LAYERS,
});
- map.map.getCanvas().style.cursor = features.length
- ? DRAGGABLE_LAYERS_SET.has(features[0]?.layer?.id)
- ? "move"
- : "pointer"
- : "";
+ map.map.getCanvas().style.cursor = features.length ? "pointer" : "";
};
}, [map]);
@@ -170,6 +163,7 @@ export const MapComponentPublic = memo(function MapComponent({
userId: undefined,
selection,
rep,
+ pmap: mapRef.current!,
};
const HANDLERS = useHandlers(handlerContext);
diff --git a/app/lib/__snapshots__/load_and_augment_style.test.ts.snap b/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
index 7ce3be461..0474d0fad 100644
--- a/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
+++ b/app/lib/__snapshots__/load_and_augment_style.test.ts.snap
@@ -209,68 +209,6 @@ Object {
"source": "features",
"type": "circle",
},
- Object {
- "filter": Array [
- "all",
- Array [
- "==",
- "$type",
- "Point",
- ],
- ],
- "id": "vertex",
- "layout": Object {},
- "paint": Object {
- "circle-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#fff",
- "#D6409F",
- ],
- "circle-opacity": 1,
- "circle-radius": Array [
- "case",
- Array [
- "has",
- "fp",
- ],
- 6,
- Array [
- "match",
- Array [
- "%",
- Array [
- "id",
- ],
- 2,
- ],
- 0,
- 4,
- 1,
- 2,
- 1,
- ],
- ],
- "circle-stroke-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#312E81",
- "#fff",
- ],
- "circle-stroke-opacity": 1,
- "circle-stroke-width": 1.5,
- },
- "source": "synthetic",
- "type": "circle",
- },
],
"name": "XYZ Layer",
"sources": Object {
@@ -300,15 +238,6 @@ Object {
],
"type": "raster",
},
- "synthetic": Object {
- "buffer": 512,
- "data": Object {
- "features": Array [],
- "type": "FeatureCollection",
- },
- "tolerance": 0,
- "type": "geojson",
- },
},
"sprite": "mapbox://sprites/mapbox/streets-v8",
"version": 8,
@@ -683,77 +612,6 @@ Array [
"source": "features",
"type": "circle",
},
- Object {
- "filter": Array [
- "all",
- Array [
- "==",
- "$type",
- "Point",
- ],
- ],
- "id": "vertex",
- "layout": Object {},
- "paint": Object {
- "circle-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#fff",
- "#D6409F",
- ],
- "circle-opacity": 1,
- "circle-radius": Array [
- "case",
- Array [
- "has",
- "fp",
- ],
- 6,
- Array [
- "match",
- Array [
- "%",
- Array [
- "id",
- ],
- 2,
- ],
- 0,
- 4,
- 1,
- 2,
- 1,
- ],
- ],
- "circle-stroke-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- Array [
- "match",
- Array [
- "get",
- "foo",
- ],
- 1,
- "#fff000",
- "#312E81",
- ],
- "#fff",
- ],
- "circle-stroke-opacity": 1,
- "circle-stroke-width": 1.5,
- },
- "source": "synthetic",
- "type": "circle",
- },
]
`;
@@ -1113,68 +971,6 @@ Array [
"source": "features",
"type": "circle",
},
- Object {
- "filter": Array [
- "all",
- Array [
- "==",
- "$type",
- "Point",
- ],
- ],
- "id": "vertex",
- "layout": Object {},
- "paint": Object {
- "circle-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#fff",
- "#D6409F",
- ],
- "circle-opacity": 1,
- "circle-radius": Array [
- "case",
- Array [
- "has",
- "fp",
- ],
- 6,
- Array [
- "match",
- Array [
- "%",
- Array [
- "id",
- ],
- 2,
- ],
- 0,
- 4,
- 1,
- 2,
- 1,
- ],
- ],
- "circle-stroke-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#312E81",
- "#fff",
- ],
- "circle-stroke-opacity": 1,
- "circle-stroke-width": 1.5,
- },
- "source": "synthetic",
- "type": "circle",
- },
]
`;
@@ -1524,93 +1320,6 @@ Array [
"source": "features",
"type": "circle",
},
- Object {
- "filter": Array [
- "all",
- Array [
- "==",
- "$type",
- "Point",
- ],
- ],
- "id": "vertex",
- "layout": Object {},
- "paint": Object {
- "circle-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#fff",
- "#D6409F",
- ],
- "circle-opacity": 1,
- "circle-radius": Array [
- "case",
- Array [
- "has",
- "fp",
- ],
- 6,
- Array [
- "match",
- Array [
- "%",
- Array [
- "id",
- ],
- 2,
- ],
- 0,
- 4,
- 1,
- 2,
- 1,
- ],
- ],
- "circle-stroke-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- Array [
- "match",
- Array [
- "typeof",
- Array [
- "get",
- "foo",
- ],
- ],
- "number",
- Array [
- "interpolate-lab",
- Array [
- "linear",
- ],
- Array [
- "get",
- "foo",
- ],
- 1,
- "#fff000",
- 10,
- "#fff000",
- ],
- "#312E81",
- ],
- "#fff",
- ],
- "circle-stroke-opacity": 1,
- "circle-stroke-width": 1.5,
- },
- "source": "synthetic",
- "type": "circle",
- },
]
`;
@@ -2002,68 +1711,6 @@ Array [
"source": "features",
"type": "circle",
},
- Object {
- "filter": Array [
- "all",
- Array [
- "==",
- "$type",
- "Point",
- ],
- ],
- "id": "vertex",
- "layout": Object {},
- "paint": Object {
- "circle-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#fff",
- "#D6409F",
- ],
- "circle-opacity": 1,
- "circle-radius": Array [
- "case",
- Array [
- "has",
- "fp",
- ],
- 6,
- Array [
- "match",
- Array [
- "%",
- Array [
- "id",
- ],
- 2,
- ],
- 0,
- 4,
- 1,
- 2,
- 1,
- ],
- ],
- "circle-stroke-color": Array [
- "match",
- Array [
- "feature-state",
- "state",
- ],
- "selected",
- "#312E81",
- "#fff",
- ],
- "circle-stroke-opacity": 1,
- "circle-stroke-width": 1.5,
- },
- "source": "synthetic",
- "type": "circle",
- },
Object {
"filter": Array [
"all",
diff --git a/app/lib/constants.ts b/app/lib/constants.ts
index 7f3e9f603..7ee31fa5b 100644
--- a/app/lib/constants.ts
+++ b/app/lib/constants.ts
@@ -5,11 +5,24 @@ import { hexToArray } from "app/lib/color";
type GeoJSONTypeList = GeoJSON["type"][];
type GeometryTypeList = Geometry["type"][];
+/**
+ * Layer names
+ */
+
+export const DECK_SYNTHETIC_ID = "deckgl-synthetic";
+export const DECK_LASSO_ID = "deckgl-lasso";
+
/**
* Colors
*/
export const purple900 = "#312E81";
+export const LINE_COLORS_IDLE = "#8B5CF6";
+export const LINE_COLORS_IDLE_RGBA = hexToArray("#8B5CF6");
+
+export const LINE_COLORS_SELECTED = "#D6409F";
+export const LINE_COLORS_SELECTED_RGB = hexToArray("#D6409F");
+
// Note, this is also in the database schema.
// If changing it here, it may need to be changed there too.
export const UNTITLED = "Untitled";
diff --git a/app/lib/handlers/lasso.ts b/app/lib/handlers/lasso.ts
index 7bd9a1ebd..2fa63dee8 100644
--- a/app/lib/handlers/lasso.ts
+++ b/app/lib/handlers/lasso.ts
@@ -15,6 +15,7 @@ export function useLassoHandlers({
idMap,
folderMap,
selection,
+ pmap,
}: HandlerContext): Handlers {
return {
click: useAtomCallback(
@@ -76,9 +77,14 @@ export function useLassoHandlers({
set(modeAtom, { mode: Mode.NONE });
return;
}
- // From here on out we assume that this was a shift-click.
- const fuzzyResult = utils.fuzzyClick(e, { idMap, featureMap, folderMap });
+ // From here on out we assume that this was a shift-click.
+ const fuzzyResult = utils.fuzzyClick(e, {
+ idMap,
+ featureMap,
+ folderMap,
+ pmap,
+ });
if (!fuzzyResult) {
set(selectionAtom, USelection.none());
return;
diff --git a/app/lib/handlers/none.ts b/app/lib/handlers/none.ts
index ba96a6437..b5ea1e10e 100644
--- a/app/lib/handlers/none.ts
+++ b/app/lib/handlers/none.ts
@@ -4,7 +4,6 @@ import {
generateVertexFlatbushInstance,
} from "app/lib/generate_flatbush_instance";
import { decodeId, encodeVertex } from "app/lib/id";
-import { DRAGGABLE_LAYERS } from "app/lib/load_and_augment_style";
import * as utils from "app/lib/map_component_utils";
import type { HandlerContext } from "types";
import noop from "lodash/noop";
@@ -21,7 +20,7 @@ import { USelection } from "state";
import { modeAtom } from "state/mode";
import { useEndSnapshot, useStartSnapshot } from "app/lib/persistence/shared";
import { filterLockedFeatures } from "app/lib/folder";
-import { CURSOR_DEFAULT } from "app/lib/constants";
+import { CURSOR_DEFAULT, DECK_SYNTHETIC_ID } from "app/lib/constants";
import { UIDMap } from "app/lib/id_mapper";
import { getMapCoord } from "./utils";
import { useRef } from "react";
@@ -36,6 +35,7 @@ export function useNoneHandlers({
idMap,
folderMap,
rep,
+ pmap,
}: HandlerContext): Handlers {
const setEphemeralState = useSetAtom(ephemeralStateAtom);
const setMode = useSetAtom(modeAtom);
@@ -61,7 +61,6 @@ export function useNoneHandlers({
const handlers: Handlers = {
double: noop,
down: (e) => {
- const map = e.target;
lastPoint.current = e.lngLat;
// If this is a right-click, ignore it. The context menu
@@ -147,14 +146,16 @@ export function useNoneHandlers({
// Is this a potential drag or selection?
// If there is a feature under the cursor, prevent this
// from being a drag and set the current drag target.
- const [feature] = map.queryRenderedFeatures(e.point, {
- layers: DRAGGABLE_LAYERS,
+ const feature = pmap.overlay.pickObject({
+ ...e.point,
+ layerIds: [DECK_SYNTHETIC_ID],
});
- if (!feature || selection.type !== "single") return;
+ if (!feature?.object || selection.type !== "single") return;
e.preventDefault();
- const id = decodeId(feature.id as RawId);
+ const rawId = feature.object.id as RawId;
+ const id = decodeId(rawId);
const wrappedFeature = featureMap.get(selection.id);
if (!wrappedFeature) {
@@ -188,7 +189,7 @@ export function useNoneHandlers({
}
void startSnapshot(wrappedFeature);
- dragTargetRef.current = feature.id as RawId;
+ dragTargetRef.current = rawId;
setCursor("pointer");
},
up: () => {
@@ -269,7 +270,12 @@ export function useNoneHandlers({
click: (e) => {
// Get the fuzzy feature. This is a mapboxgl feature
// with only an id.
- const fuzzyResult = utils.fuzzyClick(e, { idMap, featureMap, folderMap });
+ const fuzzyResult = utils.fuzzyClick(e, {
+ idMap,
+ featureMap,
+ folderMap,
+ pmap,
+ });
// If there's a selection right now and someone clicked on
// bare map, clear the selection.
diff --git a/app/lib/handlers/polygon.ts b/app/lib/handlers/polygon.ts
index 045a8990f..44ea89080 100644
--- a/app/lib/handlers/polygon.ts
+++ b/app/lib/handlers/polygon.ts
@@ -4,12 +4,11 @@ import { modeAtom, Mode, selectionAtom, cursorStyleAtom } from "state/jotai";
import * as utils from "app/lib/map_component_utils";
import * as Sentry from "@sentry/nextjs";
import replaceCoordinates from "app/lib/replace_coordinates";
-import { VERTEX_LAYER_NAME } from "app/lib/load_and_augment_style";
import { decodeId } from "app/lib/id";
import { useSetAtom } from "jotai";
import { usePopMoment } from "app/lib/persistence/shared";
import { closePolygon } from "app/lib/map_operations";
-import { CURSOR_DEFAULT } from "app/lib/constants";
+import { CURSOR_DEFAULT, DECK_SYNTHETIC_ID } from "app/lib/constants";
import { UIDMap } from "app/lib/id_mapper";
import { createOrUpdateFeature, getMapCoord } from "./utils";
import { useRef } from "react";
@@ -21,6 +20,7 @@ export function usePolygonHandlers({
idMap,
featureMap,
dragTargetRef,
+ pmap,
}: HandlerContext): Handlers {
const multi = mode.modeOptions?.multi;
const setSelection = useSetAtom(selectionAtom);
@@ -56,10 +56,11 @@ export function usePolygonHandlers({
return;
}
- const map = e.target;
- const clickedFeatures = map.queryRenderedFeatures(e.point, {
- layers: [VERTEX_LAYER_NAME],
+ const clickedFeatures = pmap.overlay.pickMultipleObjects({
+ ...e.point,
+ layerIds: [DECK_SYNTHETIC_ID],
});
+
const newPos = getMapCoord(e);
const wrappedFeature = featureMap.get(selection.id);
@@ -73,7 +74,8 @@ export function usePolygonHandlers({
// Ending a polygon
if (
clickedFeatures.some((feature) => {
- const id = decodeId(feature.id as RawId);
+ if (feature.object?.id === undefined) return false;
+ const id = decodeId(feature.object.id as RawId);
return (
id.type === "vertex" &&
UIDMap.getUUID(idMap, id.featureId) === selection.id &&
diff --git a/app/lib/load_and_augment_style.ts b/app/lib/load_and_augment_style.ts
index 90097800a..e33207aad 100644
--- a/app/lib/load_and_augment_style.ts
+++ b/app/lib/load_and_augment_style.ts
@@ -2,7 +2,10 @@ import type { PreviewProperty } from "state/jotai";
// TODO: this is a UI concern that should be separate.
import type { Style } from "mapbox-gl";
import mapboxgl from "mapbox-gl";
-import { emptyFeatureCollection } from "app/lib/constants";
+import {
+ emptyFeatureCollection,
+ LINE_COLORS_SELECTED,
+} from "app/lib/constants";
import type { ISymbolization, LayerConfigMap } from "types";
import {
addMapboxStyle,
@@ -22,15 +25,9 @@ function getEmptyStyle() {
return style;
}
-const LINE_COLORS = {
- idle: "#8B5CF6",
- selected: "#D6409F",
-} as const;
-
const CIRCLE_LAYOUT: mapboxgl.CircleLayout = {};
export const FEATURES_SOURCE_NAME = "features";
-export const SYNTHETIC_SOURCE_NAME = "synthetic";
export const EPHEMERAL_SOURCE_NAME = "ephemeral";
export const EPHEMERAL_LINE_LAYER_NAME = "ephemeral-line";
@@ -45,7 +42,6 @@ export const FEATURES_LINE = "features-label";
export const CURSORS_POINT_LAYER_NAME = "cursors-symbol";
export const FEATURES_LINE_LAYER_NAME = "features-line";
export const FEATURES_FILL_LAYER_NAME = "features-fill";
-export const VERTEX_LAYER_NAME = "vertex";
const emptyGeoJSONSource = {
type: "geojson",
@@ -118,7 +114,6 @@ export function addEditingLayers({
previewProperty: PreviewProperty;
}) {
style.sources[FEATURES_SOURCE_NAME] = emptyGeoJSONSource;
- style.sources[SYNTHETIC_SOURCE_NAME] = emptyGeoJSONSource;
style.sources[EPHEMERAL_SOURCE_NAME] = emptyGeoJSONSource;
if (!style.layers) {
@@ -197,16 +192,6 @@ export function makeLayers({
paint: CIRCLE_PAINT(symbolization),
},
- // Vertexes. Created with generateSyntheticPoints.
- {
- id: VERTEX_LAYER_NAME,
- type: "circle",
- source: SYNTHETIC_SOURCE_NAME,
- layout: {},
- filter: ["all", ["==", "$type", "Point"]],
- paint: VERTEX_PAINT(symbolization),
- },
-
...(typeof previewProperty === "string"
? [
{
@@ -214,7 +199,7 @@ export function makeLayers({
type: "symbol",
source: FEATURES_SOURCE_NAME,
paint: LABEL_PAINT(symbolization, previewProperty),
- layout: LABEL_LAYOUT(symbolization, previewProperty, "point"),
+ layout: LABEL_LAYOUT(previewProperty, "point"),
filter: addPreviewFilter(
CONTENT_LAYER_FILTERS[FEATURES_POINT_LAYER_NAME],
previewProperty
@@ -225,7 +210,7 @@ export function makeLayers({
type: "symbol",
source: FEATURES_SOURCE_NAME,
paint: LABEL_PAINT(symbolization, previewProperty),
- layout: LABEL_LAYOUT(symbolization, previewProperty, "line"),
+ layout: LABEL_LAYOUT(previewProperty, "line"),
filter: addPreviewFilter(
CONTENT_LAYER_FILTERS[FEATURES_LINE_LAYER_NAME],
previewProperty
@@ -236,7 +221,7 @@ export function makeLayers({
type: "symbol",
source: FEATURES_SOURCE_NAME,
paint: LABEL_PAINT(symbolization, previewProperty),
- layout: LABEL_LAYOUT(symbolization, previewProperty, "point"),
+ layout: LABEL_LAYOUT(previewProperty, "point"),
filter: addPreviewFilter(
CONTENT_LAYER_FILTERS[FEATURES_FILL_LAYER_NAME],
previewProperty
@@ -335,7 +320,6 @@ function LABEL_PAINT(
}
function LABEL_LAYOUT(
- symbolization: ISymbolization,
previewProperty: PreviewProperty,
placement: mapboxgl.SymbolLayout["symbol-placement"]
): mapboxgl.SymbolLayout {
@@ -382,7 +366,7 @@ export function CIRCLE_PAINT(
"match",
["feature-state", "state"],
"selected",
- LINE_COLORS.selected,
+ LINE_COLORS_SELECTED,
"white",
],
"circle-stroke-width": 1,
@@ -440,7 +424,7 @@ export function FILL_PAINT(
"fill-color": handleSelected(
asColorExpression({ symbolization, part: "fill" }),
exp,
- LINE_COLORS.selected
+ LINE_COLORS_SELECTED
),
};
}
@@ -463,58 +447,17 @@ export function LINE_PAINT(
"line-color": handleSelected(
asColorExpression({ symbolization, part: "stroke" }),
exp,
- LINE_COLORS.selected
+ LINE_COLORS_SELECTED
),
};
}
-export function VERTEX_PAINT(
- symbolization: ISymbolization,
- exp = false
-): mapboxgl.CirclePaint {
- return {
- "circle-radius": exp
- ? 6
- : [
- "case",
- ["has", "fp"],
- 6,
- [
- "match",
- ["%", ["id"], 2],
- // Even ids are vertexes, which are larger
- 0,
- 4,
- // Odd ids are midpoints
- 1,
- 2,
- // A fallback is required but this is exhausive,
- // so this value can be ignored.
- 1,
- ],
- ],
- "circle-stroke-color": handleSelected(
- "#fff",
- exp,
- asColorExpression({ symbolization, part: "stroke" })
- ),
- "circle-color": handleSelected(LINE_COLORS.selected, exp, "#fff"),
- "circle-stroke-width": 1.5,
- "circle-stroke-opacity": 1,
- "circle-opacity": 1,
- };
-}
-
export const CONTENT_LAYERS = [
FEATURES_POINT_LAYER_NAME,
FEATURES_FILL_LAYER_NAME,
FEATURES_LINE_LAYER_NAME,
];
-export const DRAGGABLE_LAYERS = [VERTEX_LAYER_NAME];
-export const DRAGGABLE_LAYERS_SET = new Set(DRAGGABLE_LAYERS);
-
export const CLICKABLE_LAYERS = CONTENT_LAYERS.concat([
- VERTEX_LAYER_NAME,
EPHEMERAL_FILL_LAYER_NAME,
]);
diff --git a/app/lib/map_component_utils.ts b/app/lib/map_component_utils.ts
index 508b46f6f..af799a88d 100644
--- a/app/lib/map_component_utils.ts
+++ b/app/lib/map_component_utils.ts
@@ -14,6 +14,8 @@ import sortBy from "lodash/sortBy";
import { isFeatureLocked } from "./folder";
import { IDMap, UIDMap } from "./id_mapper";
import { getMapCoord } from "./handlers/utils";
+import PMap from "app/lib/pmap";
+import { DECK_SYNTHETIC_ID } from "app/lib/constants";
type MouseOrTouchEvent = mapboxgl.MapMouseEvent | mapboxgl.MapTouchEvent;
@@ -82,23 +84,52 @@ export function fuzzyClick(
idMap,
featureMap,
folderMap,
+ pmap,
}: {
idMap: IDMap;
featureMap: FeatureMap;
folderMap: FolderMap;
+ pmap: PMap;
}
) {
const map = e.target;
+ const ids: RawId[] = [];
+
+ const pickInfo = pmap.overlay.pickObject({
+ ...e.point,
+ layerIds: [DECK_SYNTHETIC_ID],
+ });
+
+ if (pickInfo) {
+ ids.push(pickInfo.object.id as RawId);
+ } else {
+ const multiPickInfo = pmap.overlay.pickMultipleObjects({
+ ...e.point,
+ radius: 10,
+ layerIds: [DECK_SYNTHETIC_ID],
+ });
+
+ if (multiPickInfo) {
+ for (const info of multiPickInfo) {
+ ids.push(info.object.id as RawId);
+ }
+ }
+ }
+
let mapFeatures = map.queryRenderedFeatures(e.point, QRF_OPTIONS);
if (!mapFeatures.length) {
mapFeatures = map.queryRenderedFeatures(bufferPoint(e.point), QRF_OPTIONS);
}
+ for (const feature of mapFeatures) {
+ ids.push(feature.id as RawId);
+ }
+
const results: Array<{ wrappedFeature: IWrappedFeature; decodedId: Id }> = [];
- for (const clickedFeature of mapFeatures) {
- const decodedId = decodeId(clickedFeature.id as RawId);
+ for (const id of ids) {
+ const decodedId = decodeId(id);
const uuid = UIDMap.getUUID(idMap, decodedId.featureId);
const wrappedFeature = featureMap.get(uuid);
if (wrappedFeature && !isFeatureLocked(wrappedFeature, folderMap)) {
diff --git a/app/lib/pmap/index.ts b/app/lib/pmap/index.ts
index 37a583a37..5ce7e1220 100644
--- a/app/lib/pmap/index.ts
+++ b/app/lib/pmap/index.ts
@@ -1,7 +1,6 @@
import mapboxgl from "mapbox-gl";
import loadAndAugmentStyle, {
FEATURES_SOURCE_NAME,
- SYNTHETIC_SOURCE_NAME,
EPHEMERAL_SOURCE_NAME,
} from "app/lib/load_and_augment_style";
import type {
@@ -16,6 +15,10 @@ import {
emptySelection,
LASSO_YELLOW,
LASSO_DARK_YELLOW,
+ LINE_COLORS_SELECTED_RGB,
+ WHITE,
+ DECK_SYNTHETIC_ID,
+ DECK_LASSO_ID,
} from "app/lib/constants";
import { splitFeatureGroups } from "app/lib/pmap/split_feature_groups";
import type {
@@ -24,6 +27,8 @@ import type {
IFeatureCollection,
ISymbolization,
LayerConfigMap,
+ IFeature,
+ Point,
} from "types";
import { makeRectangle } from "app/lib/pmap/merge_ephemeral_state";
import { colorFromPresence } from "app/lib/color";
@@ -31,7 +36,7 @@ import type { Presence } from "db";
import { IDMap } from "app/lib/id_mapper";
import { shallowArrayEqual } from "app/lib/utils";
import { MapboxOverlay } from "@deck.gl/mapbox/typed";
-import { PolygonLayer } from "@deck.gl/layers/typed";
+import { PolygonLayer, ScatterplotLayer } from "@deck.gl/layers/typed";
const MAP_OPTIONS: Omit<mapboxgl.MapboxOptions, "container"> = {
style: { version: 8, layers: [], sources: {} },
@@ -300,11 +305,7 @@ export default class PMap {
EPHEMERAL_SOURCE_NAME
) as mapboxgl.GeoJSONSource;
- const syntheticSource = this.map.getSource(
- SYNTHETIC_SOURCE_NAME
- ) as mapboxgl.GeoJSONSource;
-
- if (!featuresSource || !syntheticSource || !ephemeralSource) {
+ if (!featuresSource || !ephemeralSource) {
// Set the lastFeatureList here
// so that the setStyle method will
// add it again. This happens when the map
@@ -330,20 +331,49 @@ export default class PMap {
// TODO: fix flash
mSetData(ephemeralSource, groups.ephemeral, "ephem");
mSetData(featuresSource, groups.features, "features", force);
- mSetData(syntheticSource, groups.synthetic, "synth");
this.overlay.setProps({
layers: [
+ new ScatterplotLayer<IFeature<Point>>({
+ id: DECK_SYNTHETIC_ID,
+
+ radiusUnits: "pixels",
+ lineWidthUnits: "pixels",
+
+ pickable: true,
+ stroked: true,
+ filled: true,
+
+ data: groups.synthetic,
+
+ getPosition: (d) => d.geometry.coordinates as [number, number],
+ getFillColor: (d) => {
+ return groups.selectionIds.has(d.id as RawId)
+ ? WHITE
+ : LINE_COLORS_SELECTED_RGB;
+ },
+ getLineColor: (d) => {
+ return groups.selectionIds.has(d.id as RawId)
+ ? LINE_COLORS_SELECTED_RGB
+ : WHITE;
+ },
+ getLineWidth: 1.5,
+ getRadius: (d) => {
+ const id = Number(d.id || 0);
+ const fp = d.properties?.fp;
+ if (fp) return 10;
+ return id % 2 === 0 ? 5 : 3.5;
+ },
+ }),
+
ephemeralState.type === "lasso" &&
- new PolygonLayer({
- id: "deckgl-lasso",
+ new PolygonLayer<number[]>({
+ id: DECK_LASSO_ID,
data: [makeRectangle(ephemeralState)],
visible: ephemeralState.type === "lasso",
pickable: false,
stroked: true,
filled: true,
- lineWidthScale: 2,
- lineWidthMinPixels: 2,
lineWidthUnits: "pixels",
getPolygon: (d) => d,
getFillColor: LASSO_YELLOW,
@@ -424,15 +454,6 @@ export default class PMap {
state: "selected",
}
);
- this.map.setFeatureState(
- {
- source: SYNTHETIC_SOURCE_NAME,
- id,
- },
- {
- state: "selected",
- }
- );
tmpSet.delete(id);
// adds++;
}
@@ -448,13 +469,6 @@ export default class PMap {
},
"state"
);
- this.map.removeFeatureState(
- {
- source: SYNTHETIC_SOURCE_NAME,
- id,
- },
- "state"
- );
// removes++;
}
}
diff --git a/types/index.ts b/types/index.ts
index 15da09d7c..5a379d08e 100644
--- a/types/index.ts
+++ b/types/index.ts
@@ -24,6 +24,7 @@ import { purple900 } from "app/lib/constants";
import { safeParseMaybe } from "app/lib/utils";
import { Just, Maybe, Nothing } from "purify-ts/Maybe";
import clamp from "lodash/clamp";
+import PMap from "app/lib/pmap";
export interface CoordProps {
x: number;
@@ -425,6 +426,7 @@ export interface HandlerContext {
idMap: IDMap;
rep: IPersistence;
userId: number | undefined;
+ pmap: PMap;
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment