VectorTileOverlay¶
Namespace: ThinkGeo.UI.Blazor
public class VectorTileOverlay : Overlay, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleEvent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable, System.IAsyncDisposable
Inheritance object → ComponentBase → Overlay → VectorTileOverlay
Implements IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IAsyncDisposable
Properties¶
StyleJson¶
A style of the style specification, as text or as the address of one. The browser draws its layers from the sources it names. Either this or VectorTileOverlay.Style.
public string StyleJson { get; set; }
Property Value¶
Style¶
A style of the style specification, composed in code: its sources, its layers, the images it draws symbols with. Either this or VectorTileOverlay.StyleJson. A document that changes is drawn again on , without its tiles being fetched again.
public MapStyle Style { get; set; }
Property Value¶
MapStyle
Isolines¶
Scattered values drawn as a GPU field and contours by the MapLibre renderer.
public IsolineOverlayOptions Isolines { get; set; }
Property Value¶
RasterTileSource¶
Raster tiles composed into VectorTileOverlay.Style, served from the application through the map circuit. Use the same source id in VectorTileOverlay.RasterSourceId and AddRaster.
public RasterTileSource RasterTileSource { get; set; }
Property Value¶
RasterTileSource
RasterSourceId¶
The source id used by VectorTileOverlay.RasterTileSource in the style.
public string RasterSourceId { get; set; }
Property Value¶
FeatureSources¶
Feature sources - shapefiles, in-memory features, database tables - drawn by the style. Each is keyed by the name the style's layers give as "source-layer"; all of them answer to the one source named VectorTileOverlay.SourceId. A few in-memory features are handed to the browser whole and cut there (see VectorTileOverlay.PushThreshold); anything else is cut into vector tiles on the server as the browser asks, the tiles travelling over the circuit the way a LayerOverlay's do. Nothing has to be served from an address.
public GeoCollection<FeatureSource> FeatureSources { get; set; }
Property Value¶
GeoCollection<FeatureSource>
SourceId¶
The name the cut tiles answer to in the style: what its layers give as "source". The style need not declare the source; one is put in for it. Null takes the first vector source the style declares, or "features" when it declares none.
public string SourceId { get; set; }
Property Value¶
IsSourceStatic¶
Whether the feature sources never change while this overlay is up. When they do not, a redraw does not ask the browser to fetch its tiles again. The cutter keeps its own cut tiles either way and empties them when a source it is watching changes, so this only spares the round trip. Right for in-memory features built once; wrong for a source that is edited.
public bool IsSourceStatic { get; set; }
Property Value¶
PushThreshold¶
Up to this many features in all, in-memory feature sources are handed to the browser whole and cut there, instead of being cut into tiles on the server as the browser asks: one transfer, then nothing - panning, zooming and a feature that moves cost the server no request at all. Above it, or for a source that is not in memory, the server cuts. 0 turns the hand-over off.
public int PushThreshold { get; set; }
Property Value¶
Cluster¶
Groups the handed-over point features into clusters - a crowd of pins drawn as one numbered circle that splits as the map zooms in. It applies to features given to the browser whole (within VectorTileOverlay.PushThreshold); the style's layers read the cluster with ["get","point_count"] and the has "point_count" filter.
public bool Cluster { get; set; }
Property Value¶
ClusterRadius¶
The radius, in screen pixels, within which points fall into one cluster.
public int ClusterRadius { get; set; }
Property Value¶
ClusterMaxZoom¶
The zoom past which clusters stop forming and every point is drawn on its own.
public int ClusterMaxZoom { get; set; }
Property Value¶
IsVisible¶
public bool IsVisible { get; set; }
Property Value¶
Id¶
Gets or sets the unique identifier used to register this overlay with the map. Defaults to a new GUID.
public string Id { get; set; }
Property Value¶
Constructors¶
VectorTileOverlay()¶
public VectorTileOverlay()
Methods¶
BuildRenderTree(RenderTreeBuilder)¶
protected void BuildRenderTree(RenderTreeBuilder __builder)
Parameters¶
__builder RenderTreeBuilder
Returns¶
b()¶
internal Task<LV> b()
Returns¶
GetIsolineFieldAsync()¶
Read a sampled GPU field back for contour feature export.
public Task<IsolineFieldSnapshot> GetIsolineFieldAsync()
Returns¶
RedrawAsync()¶
Draws the style again, for a change the overlay could not see: a VectorTileOverlay.Style changed in place is sent again - its layers changed where they stand, its sources and their tiles kept, and its features not sent a second time; a style that is as it was means the data changed, and the feature sources are handed over or cut again as the browser asks, unless VectorTileOverlay.IsSourceStatic says they never change. Raster tiles are fetched again when a raster source is present. A new document assigned to VectorTileOverlay.Style needs none of this: it is drawn as soon as it arrives, and its features are left where they are for the same reason.
public Task RedrawAsync()
Returns¶
InitializeAsyncCore()¶
protected Task InitializeAsyncCore()
Returns¶
ReleaseAsyncCore()¶
protected Task ReleaseAsyncCore()
Returns¶
OnAfterRenderAsync(bool)¶
protected Task OnAfterRenderAsync(bool firstRender)
Parameters¶
firstRender bool
Returns¶
OnParametersSet()¶
protected void OnParametersSet()
Returns¶
OnInitialized()¶
protected void OnInitialized()
Returns¶
ShouldRender()¶
protected bool ShouldRender()
Returns¶
F()¶
internal Dictionary<string, List<PushedFeatureOptions>> F()