Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile ArcGis FeatureServer requests #7370

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
28f942a
First version of arcgis feature server tiling
nf-s Dec 13, 2024
4753d1b
Fix arg
nf-s Dec 13, 2024
f1fd5bb
Add basic circle symbolizer to arcgis tiling
nf-s Dec 13, 2024
b6e59e3
Add request to arcgis image server imagery provider
nf-s Dec 18, 2024
257a067
ArcGis feature tiling protomaps styling working
nf-s Dec 18, 2024
cade27e
Reduce protomaps buffer and add buffer to arcgis pbf source
nf-s Dec 18, 2024
d97b121
Merge remote-tracking branch 'origin/main' into tile-arcgis-featurese…
nf-s Dec 24, 2024
617067b
fix recomputed style fn
nf-s Dec 24, 2024
a4b4877
Add dashed line support to OutlineStyleTraits, and add Esri line symb…
nf-s Dec 24, 2024
2d23761
Add feature server min scale and "open in ArcGis web viewer" button
nf-s Dec 24, 2024
505b4f2
First version of feature picking
nf-s Jan 9, 2025
d8ff521
Remove clg, and remove geom from feature picking requests
nf-s Jan 15, 2025
1463372
Add radius to tableStyleToProtomaps
nf-s Jan 15, 2025
a1daec0
Fix FeatureInfoUrlTemplateMixin reactivity
nf-s Jan 15, 2025
447d661
FeatureServerCatalogItem: Add MinMaxLevelMixin (for tiling), add warn…
nf-s Jan 15, 2025
474008c
Add point style size for ProtomapsImageryProvider mapItems
nf-s Jan 15, 2025
269b7af
Merge branch 'upgrade-protomaps-leaflet' into tile-arcgis-featureserver
nf-s Jan 30, 2025
d3dd21c
fix type
nf-s Jan 30, 2025
00a9a01
Merge remote-tracking branch 'origin/main' into tile-arcgis-featurese…
nf-s Feb 4, 2025
f5d2959
Add some changes, remove showOpenInArcGisWebViewer and add objectIdFi…
nf-s Feb 4, 2025
7501ead
Add docs, fix some bugs and start adding tests
nf-s Feb 4, 2025
e66e1ce
Add basic tiled feature server tests
nf-s Feb 5, 2025
9a4d7a5
Add arcgisfeatureserver minmax level test
nf-s Feb 5, 2025
b7e5b42
clean up
nf-s Feb 5, 2025
d582bc2
Fix buildEsriJson throwing error inside get mapItems
nf-s Feb 6, 2025
5ba5130
Fix expand error
nf-s Feb 6, 2025
f59eea3
Address feedback and fix geojson multipolygon bug
nf-s Feb 6, 2025
ff12ed4
Fix error message
nf-s Feb 6, 2025
dac707d
fix changes
nf-s Feb 6, 2025
a73f22e
Fix geojson source bbox bug + add test
nf-s Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,29 @@

#### next release (8.7.12)

**Breaking changes**

- Add tiling support to `ArcGisFeatureServerCatalogItem` - this will be enabled by default if the server supports tiling and unsupported marker/point styles aren't used. See `ArcGisFeatureServerCatalogTraits` `tileRequests`. When enabled, `pbf` tiles will be fetched and drawn using `ProtomapsImageryProvider`

- This can be disabled by setting `tileRequests` to `false`
- For point features, only the following `PointSymbolTraits` are available - fill, stroke, radius (which uses height). Custom markers (markers other than `point` or `circle`) are not supported.

- Remove `MapboxImageryProvider`, `createRegionMappedImageryProvider` now uses `ProtomapsImageryProvider`.
- Update `protomaps` to `protomaps-leaflet`. This fixes the 5400 vertex limit in a single tile.
- The very basic support of mvt style spec is now handled by Terria in [`lib/Map/Vector/mapboxStyleJsonToProtomaps.ts`](lib/Map/Vector/mapboxStyleJsonToProtomaps.ts)
- Move `GeojsonSource` to new file `lib/Map/Vector/ProtomapsGeojsonSource.ts`.
- support URL parameters in a GetLegendGraphic request for a layer without a style configured
- Enhanced error processing for obtaining user location
- Add `request` parameter to `ArcGisImageServerImageryProvider.buildImageResource` - this enables Cesium to manage requests
- Decrease protomaps tile buffer to 32 pixels (from 64) to increase performance
- Change `ProtomapsImageryProvider` to use a "soft" minimum level, so all tiles will be blank below the `minimumZoom` provided.
- Move `ProtomapsImageryProvider.pickFeatures` GeoJSON logic to inside `ProtomapsGeojsonSource.pickFeatures`.
- Fix `FeatureInfoUrlTemplateMixin` reactivity warnings
- Move `GeojsonMixin` protomaps paint/label rules to `tableStyleToProtomaps`.
- Also create `getStyleReactiveDependencies` that can be used to track (and react to) table styling traits
- Add `dash` to `OutlineStyleTraits` (only supported by line features), and `outlineStyle` to `LegendTraits`.
- Add `MinMaxLevelMixin` to `ArcGisFeatureServerCatalogItem` - only applied when tiling requests
- Tweaked `TableStyleMap` and `TableColorMap` conditions to handle empty `TableColumns` (to support styling `ArcGisFeatureServerCatalogItem` when tiling requests)
- [The next improvement]

#### 8.7.11 - 2024-12-18
Expand Down
2 changes: 2 additions & 0 deletions lib/Core/TypeModifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export type CopyNullAndUndefined<TSource, TTarget> = If<
*/
export type NotUndefined<T> = T extends undefined ? never : T;

export type NotNull<T> = T extends null ? never : T;

/**
* Makes all properties required to be present. Any that were previously optional are
* allowed to be undefined.
Expand Down
5 changes: 2 additions & 3 deletions lib/Map/ColorMap/ColorMap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Color from "terriajs-cesium/Source/Core/Color";
import JsonValue from "../../Core/Json";

export default abstract class ColorMap {
abstract mapValueToColor(
value: string | number | null | undefined
): Readonly<Color>;
abstract mapValueToColor(value: JsonValue | undefined): Readonly<Color>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubt: is this change required? Most implementations of ColorMap assumes the param to be string | .... Also the JsonValue imported here comes from protomap-leaflet

}
13 changes: 8 additions & 5 deletions lib/Map/ImageryProvider/ArcGisImageServerImageryProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import GeographicProjection from "terriajs-cesium/Source/Core/GeographicProjecti
import GeographicTilingScheme from "terriajs-cesium/Source/Core/GeographicTilingScheme";
import Math from "terriajs-cesium/Source/Core/Math";
import Rectangle from "terriajs-cesium/Source/Core/Rectangle";
import Request from "terriajs-cesium/Source/Core/Request";
import Resource from "terriajs-cesium/Source/Core/Resource";
import TilingScheme from "terriajs-cesium/Source/Core/TilingScheme";
import DiscardMissingTileImagePolicy from "terriajs-cesium/Source/Scene/DiscardMissingTileImagePolicy";
Expand Down Expand Up @@ -123,10 +124,11 @@ export default class ArcGisImageServerImageryProvider {
return this.baseResource.proxy;
}

buildImageResource(x: number, y: number, level: number) {
buildImageResource(x: number, y: number, level: number, request?: Request) {
if (this.usePreCachedTiles) {
return this.baseResource.getDerivedResource({
url: `tile/${level}/${y}/${x}`
url: `tile/${level}/${y}/${x}`,
request: request
});
} else {
const nativeRectangle = this.tilingScheme.tileXYToNativeRectangle(
Expand Down Expand Up @@ -154,7 +156,8 @@ export default class ArcGisImageServerImageryProvider {

return this.baseResource.getDerivedResource({
url: "exportImage",
queryParameters: query
queryParameters: query,
request: request
});
}
}
Expand All @@ -163,10 +166,10 @@ export default class ArcGisImageServerImageryProvider {
return [];
}

requestImage(x: number, y: number, level: number): any {
requestImage(x: number, y: number, level: number, request: Request): any {
return ImageryProvider.loadImage(
this,
this.buildImageResource(x, y, level)
this.buildImageResource(x, y, level, request)
);
}

Expand Down
Loading
Loading