Skip to content

Commit

Permalink
Arcgis server support (#641)
Browse files Browse the repository at this point in the history
Adds support for adding dynamic links to ArcGIS services for visualization on the map, as well as a new Legend component which is available for all map data sources.
  • Loading branch information
underbluewaters authored Dec 8, 2023
1 parent 1d9eef5 commit 3c4cb5d
Show file tree
Hide file tree
Showing 184 changed files with 54,344 additions and 14,112 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
build_label: ${{ steps.short_sha.outputs.sha }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: short_sha
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- run_migrations
- export_commit
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
client: ${{ steps.changes.outputs.client }}
build_label: ${{ steps.short_sha.outputs.sha }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: short_sha
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- detect_changes
- run_migrations
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
needs:
- detect_changes
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: "18.6"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: preview_client
url: ${{ steps.wrangler.outputs.preview_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.6"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ports:
- "6379:6379"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.6"
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
ports:
- "6379:6379"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.6"
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
name: Test React Client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.6"
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
name: Build React Client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.6"
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
# ports:
# - "6379:6379"
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v2
# with:
# node-version: "18.6"
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
# ports:
# - "6379:6379"
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v2
# with:
# node-version: "18.6"
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"esbenp.prettier-vscode",
"bradymholt.pgformatter",
"apollographql.vscode-apollo",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"**/dist/**": true,
"**/infra/lib/*.d.ts": true,
"**/infra/lib/*Stack.js": true,
"node_modules": true
"node_modules": true,
"packages/client/src/lang/**/*.json": true
},
"eslint.workingDirectories": ["packages/client"],
"[git-commit]": {
Expand Down
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,27 @@
"problemMatcher": [],
"label": "Start Database & Redis",
"detail": "docker-compose up -d"
},
{
"type": "npm",
"script": "watch",
"path": "packages/mapbox-gl-esri-sources/",
"problemMatcher": [],
"label": "Rollup: mapbox-gl-esri-sources",
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "typescript",
"runOptions": {
"runOn": "folderOpen"
},
"tsconfig": "packages/mapbox-gl-esri-sources/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"group": "build",
"label": "TypeScript: watch mapbox-gl-esri-sources"
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"license": "BSD-3-Clause",
"dependencies": {
"form-data": "^4.0.0",
"node-fetch": "^2.6.7"
"node-fetch": "^2.6.7",
"typescript": "^5.2"
}
}
84 changes: 84 additions & 0 deletions packages/api/generated-schema-clean.gql
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,31 @@ enum ArcgisFeatureLayerFetchStrategy {
TILED
}

"""An input for mutations affecting `ArcgisImportItem`"""
input ArcgisImportItemInput {
id: Int
isFolder: Boolean
parentId: String
sourceId: Int
stableId: String
sublayerId: Int
title: String
}

"""An input for mutations affecting `ArcgisImportSource`"""
input ArcgisImportSourceInput {
fetchStrategy: ArcgisFeatureLayerFetchStrategy
id: Int
type: ArcgisSourceType
url: String
}

enum ArcgisSourceType {
ARCGIS_DYNAMIC_MAPSERVER
ARCGIS_RASTER_TILES
ARCGIS_VECTOR
}

"""All input for the `archiveResponses` mutation."""
input ArchiveResponsesInput {
"""
Expand Down Expand Up @@ -295,6 +320,7 @@ type Basemap implements Node {
"""The method to use when ordering `MapBookmark`."""
orderBy: [MapBookmarksOrderBy!] = [NATURAL]
): MapBookmarksConnection!
maxzoom: Int

"""Label shown in the basemap picker interface"""
name: String!
Expand Down Expand Up @@ -461,6 +487,7 @@ input BasemapInput {
Identify the labels layer lowest in the stack so that overlay layers may be placed underneath.
"""
labelsLayerId: String
maxzoom: Int

"""Label shown in the basemap picker interface"""
name: String!
Expand Down Expand Up @@ -533,6 +560,7 @@ input BasemapPatch {
Identify the labels layer lowest in the stack so that overlay layers may be placed underneath.
"""
labelsLayerId: String
maxzoom: Int

"""Label shown in the basemap picker interface"""
name: String
Expand Down Expand Up @@ -2735,6 +2763,8 @@ input DataSourceInput {
Represents an update to a `DataSource`. Fields that are set will be updated.
"""
input DataSourcePatch {
arcgisFetchStrategy: ArcgisFeatureLayerFetchStrategy

"""
Contains an attribution to be displayed when the map is shown to a user.
"""
Expand Down Expand Up @@ -6400,6 +6430,33 @@ enum GroupsOrderBy {
PROJECT_ID_DESC
}

"""All input for the `importArcgisServices` mutation."""
input ImportArcgisServicesInput {
"""
An arbitrary string value with no semantic meaning. Will be included in the
payload verbatim. May be used to track mutations by the client.
"""
clientMutationId: String
items: [ArcgisImportItemInput]
projectId: Int
sources: [ArcgisImportSourceInput]
}

"""The output of our `importArcgisServices` mutation."""
type ImportArcgisServicesPayload {
"""
The exact same `clientMutationId` that was provided in the mutation input,
unchanged and unused. May be used by a client to track mutations.
"""
clientMutationId: String

"""
Our root query field type. Allows us to run any query from our mutation payload.
"""
query: Query
tableOfContentsItems: [TableOfContentsItem!]
}

type InteractivitySetting implements Node {
"""Reads and enables pagination through a set of `Basemap`."""
basemapsByInteractivitySettingsIdConnection(
Expand Down Expand Up @@ -6514,6 +6571,7 @@ input InteractivitySettingPatch {
}

enum InteractivityType {
ALL_PROPERTIES_POPUP
BANNER
FIXED_BLOCK
NONE
Expand Down Expand Up @@ -7989,6 +8047,12 @@ type Mutation {
"""
input: GrantAdminAccessInput!
): GrantAdminAccessPayload
importArcgisServices(
"""
The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields.
"""
input: ImportArcgisServicesInput!
): ImportArcgisServicesPayload

"""
Adds current user to the list of participants for a project, sharing their
Expand Down Expand Up @@ -9292,6 +9356,12 @@ enum OptionalBasemapLayersOrderBy {
PRIMARY_KEY_DESC
}

type OutstandingSurveyInvites {
projectId: Int!
surveyId: Int!
token: String!
}

"""Information about pagination in a connection."""
type PageInfo {
"""When paginating forwards, the cursor to continue."""
Expand Down Expand Up @@ -13105,6 +13175,13 @@ type TableOfContentsItem implements Node {
"""
bounds: [BigFloat]

"""
Metadata will be returned as directly stored in the SeaSketch
database or computed by fetching from a 3rd party service,
depending on the data source type.
"""
computedMetadata: JSON

"""
Reads a single `DataLayer` that is related to this `TableOfContentsItem`.
"""
Expand All @@ -13125,6 +13202,7 @@ type TableOfContentsItem implements Node {
their children. Toggles can only be used to toggle children off
"""
isClickOffOnly: Boolean!
isCustomGlSource: Boolean

"""
Identifies whether this item is part of the draft table of contents edited by
Expand Down Expand Up @@ -13180,6 +13258,7 @@ type TableOfContentsItem implements Node {
"""Name used in the table of contents rendering"""
title: String!
translatedProps: JSON!
usesDynamicMetadata: Boolean
}

"""
Expand Down Expand Up @@ -13370,6 +13449,11 @@ enum TileScheme {
XYZ
}

type TocItemDetails {
id: Int!
type: SketchChildType!
}

"""All input for the `toggleAdminAccess` mutation."""
input ToggleAdminAccessInput {
"""
Expand Down
Loading

0 comments on commit 3c4cb5d

Please sign in to comment.