Class ScreenMapView
Fullscreen camera-drawn slippy map: the component you add to a scene to show a 2D raster map.
[DefaultExecutionOrder(100)]
public class ScreenMapView : BaseMapView, IMapFlyTarget, ITilePipelineTarget
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourScreenMapView
- Implements
- Inherited Members
Fields
ApiKey
[Tooltip("API key for providers that require one (MapTiler, Stadia, Thunderforest).")]
public string ApiKey
Field Value
ArcMode
[Tooltip("When FlyTo takes the zoom-out-then-in arc: Auto only for far off-screen jumps, Never, or Always.")]
public FlyToArcMode ArcMode
Field Value
BaseMapLabels
[Tooltip("Off picks the provider's label-free style (Carto only). Pair with Place Labels Enabled for native upright labels over a clean base.")]
public bool BaseMapLabels
Field Value
BuiltInAttribution
[Tooltip("Show the credit in the corner. Off only if you draw the same credit yourself (AttributionText / AttributionUrl).")]
public bool BuiltInAttribution
Field Value
CacheDirectoryName
[Tooltip("Base-map cache directory under Application.persistentDataPath.")]
public string CacheDirectoryName
Field Value
CacheSizeMode
[Tooltip("Platform Default: up to 10 GB desktop, 2 GB phone, trimmed to free disk. Manual: the megabyte fields below. Disk cost is the cap plus a waste allowance of 3x the cap capped at 1 GB, so a 10 GB desktop cache can occupy 11 GB until it next tidies itself up.")]
public DiskCacheSizeMode CacheSizeMode
Field Value
CapacityMode
[Tooltip("Automatic (default) sizes the tile array from the screen, max tilt, and GPU memory. Manual uses LayerCount.")]
public TileCapacityMode CapacityMode
Field Value
CoarsePrefetchDelta
[Tooltip("Also fetch this many coarser zoom levels. 0 = off. Extra requests; check your provider's terms.")]
public int CoarsePrefetchDelta
Field Value
CustomAttribution
[Tooltip("Credit text rendered in the overlay. Required by most tile services; leave empty only if your provider's terms say otherwise.")]
public string CustomAttribution
Field Value
CustomSubdomains
[Tooltip("Comma-separated subdomains for {s}, e.g. a,b,c.")]
public string CustomSubdomains
Field Value
CustomTextureFormat
[Tooltip("GPU format for custom tiles. RGB565 uses half the memory, no alpha, can band. Falls back to RGBA32 if unsupported.")]
public TileTextureFormat CustomTextureFormat
Field Value
CustomTileSizePx
[Tooltip("Tile size the server delivers: 256 or 512.")]
public int CustomTileSizePx
Field Value
CustomUrlTemplate
[Header("Custom provider")]
[Tooltip("{z} {x} {y} URL. Put the key in as {key}, not in the address. {s} = subdomains.")]
public string CustomUrlTemplate
Field Value
DefaultCacheDirectoryName
public const string DefaultCacheDirectoryName = "lansmap-tiles"
Field Value
DefaultOverlayCacheDirectoryName
public const string DefaultOverlayCacheDirectoryName = "lansmap-tiles-overlay"
Field Value
DiskCacheMB
[Tooltip("Base-map disk cache cap, megabytes. Always used in Manual; in Platform Default only if you changed it from 256. Caps the index, not the file - evicted tiles stay until a rewrite. Disk cost is the cap plus a waste allowance of 3x the cap capped at 1 GB - about 1 GB of disk at 256 MB, 11 GB at 10240.")]
[Range(16, 32768)]
public int DiskCacheMB
Field Value
ExtraTileCodecs
[NonSerialized]
public IReadOnlyList<IRuntimeTileBlockCodec> ExtraTileCodecs
Field Value
FadeAllLoads
[Tooltip("On (default): every tile load fades. Off: only zoom-level swaps fade. No effect if Tile Fade Seconds is 0.")]
public bool FadeAllLoads
Field Value
HorizonFadeEnabled
Fades the far edge of the map into HorizonFogColor instead of ending it at a hard line; off by default.
[Tooltip("Fade distant tiles into the fog color instead of ending the map at a hard line. Off by default. Only visible past tilt 60.")]
public bool HorizonFadeEnabled
Field Value
Remarks
Only visible on a map tilted steeply enough for the far edge to be on screen, which under the shipped camera model means past tilt 60. Costs one blend per drawn pixel and no extra draw call.
HorizonFogColor
Color distant tiles fade toward; match it to the camera's background so the map meets the sky without a seam.
[Tooltip("Color distant tiles fade into. Match your camera's background so the map meets the sky without a seam.")]
public Color HorizonFogColor
Field Value
- Color
HorizonFogStartFraction
Where the fade starts, as a fraction of the maximum view distance; 0.55 by default, higher starts the fade later and makes it sharper.
[Tooltip("Where the fade starts, as a fraction of the maximum view distance. Higher starts it later and makes it sharper.")]
[Range(0, 0.99)]
public double HorizonFogStartFraction
Field Value
Remarks
The fade always completes exactly at the far edge, so this only moves its near end. At 0.55 the band covers about 14 percent of screen height at tilt 75 and 4.6 percent at tilt 85.
IdleFrameInterval
[Tooltip("Render every Nth frame while idle (higher = more battery, choppier resume).")]
[Range(2, 20)]
public int IdleFrameInterval
Field Value
IdleThrottleEnabled
[Tooltip("Skip extra frames when the map is still. On by default.")]
public bool IdleThrottleEnabled
Field Value
LabelFadeSeconds
Seconds a label fades in on winning declutter and out on losing it; 0 pops instantly.
[Tooltip("Seconds a label takes to fade in or out when decluttering changes which labels win. 0.3 default. 0 = instant. Can change while running.")]
public double LabelFadeSeconds
Field Value
LabelFont
[Tooltip("Optional font for marker labels; empty = built-in LegacyRuntime.ttf.")]
public Font LabelFont
Field Value
- Font
LabelRebuildThrottleSeconds
public const double LabelRebuildThrottleSeconds = 0.1
Field Value
LabelSizePx
[Tooltip("Marker label font size in pixels.")]
public int LabelSizePx
Field Value
LayerCount
[Tooltip("Tile images kept in graphics memory. About 1 MB each at 512 px uncompressed. Ignored unless Capacity Mode is Manual.")]
public int LayerCount
Field Value
MaxFlySeconds
[Tooltip("Ceiling for van Wijk long-jump flight time in seconds.")]
public double MaxFlySeconds
Field Value
MaxViewDistanceFactor
Advanced: how far the map draws ground, in multiples of the camera distance; 2.37 by default, exactly the reach of a tilt-60 view.
[Tooltip("Advanced. How far the map draws, in multiples of the camera distance. 2.37 matches a tilt-60 view. Raising this fetches more distant tiles; cost grows with the square.")]
[Range(1, 4)]
public double MaxViewDistanceFactor
Field Value
Remarks
This cap is always in effect, whatever HorizonFadeEnabled says: it is what keeps the tile count finite when the map is tilted steeply. Raising it fetches more distant tiles and the cost grows with the square. Clamped to MaxViewDistanceFactorCeiling.
MemoryPolicy
[NonSerialized]
public TileMemoryPolicy MemoryPolicy
Field Value
OverlayApiKey
public string OverlayApiKey
Field Value
OverlayCacheDirectoryName
[Tooltip("Overlay cache directory under Application.persistentDataPath. It must resolve to a different path from the base-map cache.")]
public string OverlayCacheDirectoryName
Field Value
OverlayCacheMB
[Tooltip("Overlay disk cache cap, megabytes. Same rule as the base map, default 128. Disk cost is the cap plus a waste allowance of 3x the cap capped at 1 GB - about 512 MB of disk at 128 MB.")]
[Range(16, 32768)]
public int OverlayCacheMB
Field Value
OverlayEnabled
[Header("Overlay layer")]
[Tooltip("Second tile source composited over the base with alpha (traffic, hillshade, transit).")]
public bool OverlayEnabled
Field Value
OverlayOpacity
[Range(0, 1)]
[Tooltip("Overlay opacity over the base map.")]
public float OverlayOpacity
Field Value
OverlayProvider
public TileProvider OverlayProvider
Field Value
OverlayRetina512
[Tooltip("512 px @2x overlay tiles where the provider serves them.")]
public bool OverlayRetina512
Field Value
OverlayStyle
public string OverlayStyle
Field Value
PitchDeg
[Tooltip("Camera tilt in degrees, 0 = top-down, max 85. Past 70 the sub-pixel positioning budget no longer covers markers raised above the ground.")]
public double PitchDeg
Field Value
PitchDistanceLodEnabled
[Tooltip("On: far rows of a tilted map use coarser tiles. Off (default): one zoom for the whole view. No effect at tilt 0.")]
public bool PitchDistanceLodEnabled
Field Value
PlaceLabelsEnabled
[Tooltip("Upright place-name labels from OpenFreeMap vector tiles (keyless). Hybrid look: vector labels drawn over any raster base.")]
public bool PlaceLabelsEnabled
Field Value
Provider
[Tooltip("Tile source. Default OpenStreetMap is for trying the asset; pick your own before you ship.")]
public TileProvider Provider
Field Value
ProviderStyle
[Tooltip("Provider style name, empty = provider default (e.g. MapTiler: streets-v4).")]
public string ProviderStyle
Field Value
RasterQualityComparisonPanelEnabled
[Tooltip("On-screen raster quality comparison controls. Debug/demo only.")]
public bool RasterQualityComparisonPanelEnabled
Field Value
RegisteredProviderId
[Tooltip("Id of your own provider registered with TileProviderRegistry. Read only when Provider is Registered.")]
public string RegisteredProviderId
Field Value
Retina512Tiles
[Tooltip("512 px @2x tiles where the provider serves them (MapTiler, Stadia, Carto): sharper on high-DPI, ~4x fewer requests. Ignored elsewhere.")]
public bool Retina512Tiles
Field Value
SharedStore
[NonSerialized]
public MarkerStore SharedStore
Field Value
TerrainDebugView
Replaces the terrain's sampled basemap color with a diagnostic overlay (distance-from-camera heatmap, or a tint by which fetched elevation tile supplied each fragment's height); off by default and no effect on the flat tile path.
[Tooltip("Diagnostic only. Replaces terrain color with a distance heatmap or a coverage-source tint (which fetched DEM tile supplied each fragment's height). Off by default.")]
public TerrainDebugViewMode TerrainDebugView
Field Value
TileBytesPerPixel
public const int TileBytesPerPixel = 4
Field Value
TileCompressionPreference
[Tooltip("Codec preference for tiles in graphics memory. First one this device supports wins. Built-in: astc4x4, etc2, bc1. Empty = uncompressed. Set before Play, or switch providers.")]
public List<string> TileCompressionPreference
Field Value
TileCounterDebugPanelEnabled
[Tooltip("On-screen tile counts (download, disk, memory). Off by default; debug only.")]
public bool TileCounterDebugPanelEnabled
Field Value
TileFadeSeconds
[Tooltip("Crossfade length in seconds. 0.2 default. 0 = instant. Can change while running.")]
public double TileFadeSeconds
Field Value
TileFloorMaxZoom
[Tooltip("Pre-download z0 through this level to disk only (not GPU), when idle. z0-z4 is 341 tiles, about 5-10 MB. Set before Play. Overlay gets its own copy if enabled.")]
public int TileFloorMaxZoom
Field Value
TileFloorPrefetchEnabled
[Tooltip("Turns the disk pre-download on. Can change while running. Some low-rate providers skip it anyway.")]
public bool TileFloorPrefetchEnabled
Field Value
TileMemoryBudgetMB
[Tooltip("GPU memory for resident tiles, megabytes. 0 = from the device. LayerCount is clamped down to fit, never raised.")]
public int TileMemoryBudgetMB
Field Value
TileMipsEnabled
[Tooltip("Mip chains and trilinear on the tile arrays. Smooths far tiles when tilted. About +33% tile memory. Set before Play, or switch providers to apply.")]
public bool TileMipsEnabled
Field Value
TileUserAgent
[NonSerialized]
public string TileUserAgent
Field Value
Verbose
[Tooltip("Log tile-pipeline counters every 5 s. Off by default.")]
public bool Verbose
Field Value
WebGpuDirectUploadEnabled
[Tooltip("Browser only, experimental: skip a memory copy by uploading decoded tiles straight to the GPU. Off by default. Requires Web Worker Decode. Set before Play, or switch providers to apply.")]
public bool WebGpuDirectUploadEnabled
Field Value
WebWorkerDecodeEnabled
[Tooltip("Browser only: decode tiles in a background worker so zooming stays smooth. Off by default. Set before Play, or switch providers to apply.")]
public bool WebWorkerDecodeEnabled
Field Value
ZoomHysteresisSeconds
[Tooltip("Seconds the previous zoom's tiles stay in memory after you zoom. 0 = off. A round-trip window, not a stay-alive timer.")]
public double ZoomHysteresisSeconds
Field Value
Properties
AnchorOffsetTiles
public double AnchorOffsetTiles { get; }
Property Value
AttributionText
public string AttributionText { get; }
Property Value
AttributionUrl
public string AttributionUrl { get; }
Property Value
Batch
public TileBatchRenderer Batch { get; }
Property Value
Camera
public Camera Camera { get; }
Property Value
- Camera
CurrentOverlayView
public MapViewTransform CurrentOverlayView { get; }
Property Value
CurrentView
The transform answering every projection question for this view this frame; cached by the subclass, never allocate per read.
public override MapViewTransform CurrentView { get; }
Property Value
DiskCacheMaxBytes
Bytes the base-map disk cache may currently hold, 0 if no pipeline.
public long DiskCacheMaxBytes { get; }
Property Value
EffectiveMemoryPolicy
public TileMemoryPolicy EffectiveMemoryPolicy { get; }
Property Value
ElevationEnabled
public bool ElevationEnabled { get; set; }
Property Value
ElevationSampler
Ground height source this view's live terrain fetch has resolved, or null for a flat map (elevation off, or no live fetch has landed yet).
public override IElevationSampler ElevationSampler { get; }
Property Value
Remarks
Both subclasses build through the one TilePipelineHost
elevation fetch/lifecycle and forward its
ElevationTileSet.Sampler here - one data source for
whichever render mechanism each subclass actually uses (a
displaced tile mesh on a fullscreen map, a world-space mesh
draped over a tabletop's flat texture).
IsFlying
public bool IsFlying { get; }
Property Value
LayerStack
The ordered layer stack (named layers plus externally-registered overlays) this view draws every frame - see RegisterExternalOverlay(IMapScreenSpaceOverlay).
protected override MapLayerStack LayerStack { get; }
Property Value
Remarks
Each subclass owns a different concrete draw path (ScreenMapView through its MapDrawCoordinator, SurfaceMapView through its own render-into-texture loop), so this exposes whichever MapLayerStack instance actually backs it rather than assuming one shared implementation.
OverlayBatch
public TileBatchRenderer OverlayBatch { get; }
Property Value
OverlayStreamer
public TileStreamer OverlayStreamer { get; }
Property Value
ResolvedUserAgent
public string ResolvedUserAgent { get; }
Property Value
SelectionPinBudget
The distinct-tile budget the live streamer's own capacity-drop loop compares selection against, or the sizing recommendation when no streamer is live yet.
public int SelectionPinBudget { get; }
Property Value
Streamer
public TileStreamer Streamer { get; }
Property Value
Methods
ApplyHorizonFadeTo(TileBatchRenderer, MapViewTransform)
Applies this map's horizon-fade settings to a tile renderer for a given view.
public void ApplyHorizonFadeTo(TileBatchRenderer batch, MapViewTransform view)
Parameters
batchTileBatchRendererRenderer to configure; null is ignored.
viewMapViewTransformView the fade band is measured against.
Remarks
Public so an offline renderer that owns its own TileBatchRenderer - the capture harness does - draws the same fade the live component draws, from this one derivation rather than a copy of the arithmetic that can drift from it.
ApplyTileDependencies()
protected override void ApplyTileDependencies()
AutoLayerCount(int)
Automatic layer count from this screen's worst-case footprint and a desktop-only floor-pin lower bound; tileSizePx is unused.
public int AutoLayerCount(int tileSizePx)
Parameters
tileSizePxintAccepted to match RequestedLayerCount; the method reads the pipeline's tile size instead.
Returns
CancelFly()
Stops an in-flight FlyTo(double, double, double?, double), leaving the view where it is.
public void CancelFly()
CompactDiskCacheNow()
Tidies the disk tile cache now, reclaiming orphaned blobs, and returns true if any file got smaller.
public bool CompactDiskCacheNow()
Returns
Remarks
This is a synchronous copy of everything the cache still holds - up to several seconds at desktop cache sizes - so call it at a moment a pause is acceptable, not during interaction. The map does this by itself when the app is paused, quits, or loses focus, so most apps never need it. The exception is an app that keeps running while unfocused (Application.runInBackground): it reaches none of those moments, so if its cache fills up it stops storing new tiles until something calls this. The warning logged in that state names this method. Not rate limited, unlike the automatic hooks - a caller asking for it explicitly has already decided it is affordable.
DeriveUserAgent(string, string)
Builds a tile-request User-Agent from the player's identifier and version.
public static string DeriveUserAgent(string identifier, string version)
Parameters
identifierstringApplication identifier token; empty becomes "unknown-unity-app".
versionstringApplication version token; empty becomes "0".
Returns
DeviceTileMemoryBudgetMB()
GPU memory budget for resident tiles, in megabytes, from the effective policy.
public int DeviceTileMemoryBudgetMB()
Returns
EffectiveLayerCount(int, int, TileTextureFormat)
Layer count that will actually be allocated: requested clamped down to the memory budget, never raised.
public int EffectiveLayerCount(int requested, int tileSizePx, TileTextureFormat format = TileTextureFormat.RGBA32)
Parameters
requestedintRequested layer count before the budget clamp.
tileSizePxintTile size in px used to convert the megabyte budget into layers.
formatTileTextureFormatUncompressed GPU format when
blockBytesPer4x4is 0.
Returns
EffectiveLayerCount(int, int, TileTextureFormat, int)
Layer count that will actually be allocated, including block-compressed tiles.
public int EffectiveLayerCount(int requested, int tileSizePx, TileTextureFormat format, int blockBytesPer4x4)
Parameters
requestedintRequested layer count before the budget clamp.
tileSizePxintTile size in px used to convert the megabyte budget into layers.
formatTileTextureFormatUncompressed GPU format when
blockBytesPer4x4is not positive.blockBytesPer4x4intBytes per 4x4 compressed block; 0 or negative uses the uncompressed arithmetic.
Returns
FitToBounds(GeoBounds, ScreenSize, double)
Centers and zooms so bounds fit an explicit viewport.
public void FitToBounds(GeoBounds bounds, ScreenSize screen, double paddingPx = 60)
Parameters
boundsGeoBoundsGeographic extent to fit.
screenScreenSizeViewport size in px.
paddingPxdoubleInset from each edge in px.
FitToBounds(GeoBounds, double)
Centers and zooms so bounds fit the live screen, ignoring the call when the screen is too small for paddingPx.
public void FitToBounds(GeoBounds bounds, double paddingPx = 60)
Parameters
boundsGeoBoundsGeographic extent to fit.
paddingPxdoubleInset from each screen edge in screen px.
FitToMarkers(ScreenSize, double)
Centers and zooms to the live bulk markers using an explicit viewport, for callers outside a live player loop.
public void FitToMarkers(ScreenSize screen, double paddingPx = 60)
Parameters
screenScreenSizeViewport size in px.
paddingPxdoubleInset from each edge in px.
FitToMarkers(double)
Centers and zooms to the live bulk markers, ignoring the call when the store is empty or the screen is too small for paddingPx.
public void FitToMarkers(double paddingPx = 60)
Parameters
paddingPxdoubleInset from each screen edge in screen px.
FlyTo(double, double, double?, double)
Animates the view to a coordinate, snapping immediately when durationSeconds is not positive.
public void FlyTo(double lat, double lon, double? zoom = null, double durationSeconds = 0.3)
Parameters
latdoubleTarget latitude in degrees WGS84.
londoubleTarget longitude in degrees WGS84.
zoomdouble?Target zoom in Web Mercator zoom units; null keeps the current zoom.
durationSecondsdoubleRequested hop duration in seconds; nearby targets honor this exactly, far off-screen jumps take a longer zoom-out-then-in arc at their own pace, capped by MaxFlySeconds. See ArcMode to force or disable the arc.
IdentifiesNobody(string)
True when identifier is empty or a Unity default-company string.
public static bool IdentifiesNobody(string identifier)
Parameters
identifierstringApplication identifier to test.
Returns
MinimumLayerCount(int)
Smallest layer count that can pin the whole footprint: the footprint plus the evictable reserve.
public static int MinimumLayerCount(int worstCaseFootprint)
Parameters
worstCaseFootprintintTile count from WorstCaseFootprint(int, int).
Returns
RecommendedLayerCount(int)
Recommended layer count: two footprints (current plus last-frame retain) plus pin headroom, not a safety factor.
public static int RecommendedLayerCount(int worstCaseFootprint)
Parameters
worstCaseFootprintintTile count from WorstCaseFootprint(int, int).
Returns
RenderInto(MapViewTransform)
Draws the full map stack into the active render target with an arbitrary view.
public void RenderInto(MapViewTransform view)
Parameters
viewMapViewTransformView to render; typically a screenshot or export camera.
ReportUrpTargetSize(Camera, int, int)
Records the render-target dimensions URP selected for a camera.
public static void ReportUrpTargetSize(Camera camera, int width, int height)
Parameters
Remarks
Called by the URP renderer feature. It is useful to diagnostics because camera screen dimensions do not reveal a scaled intermediate target.
RequestedLayerCount(int)
Layer count this map asks for before the memory budget clamps it: Manual uses LayerCount; Automatic derives it and ignores tileSizePx.
public int RequestedLayerCount(int tileSizePx)
Parameters
tileSizePxintAccepted to match ITilePipelineTarget; Automatic reads the pipeline's tile size instead.
Returns
ResolvedElevationCoverageTiles()
The resolved elevation coverage tiles for this view, from the current view location and zoom; null if elevation is off.
protected override IEnumerable<TileCoord> ResolvedElevationCoverageTiles()
Returns
Remarks
Used by drift detection and the pipeline's initial build.
SetDiskCacheMaxBytes(long)
Changes how much disk the tile cache may use while the app runs, for a consuming app that offers its user a storage setting.
public void SetDiskCacheMaxBytes(long maxDataBytes)
Parameters
maxDataByteslongNew cap in bytes. Must be positive.
Remarks
Growing takes effect immediately. Shrinking drops entries over the following frames rather than in this one. The overlay layer, if any, takes half, matching the inspector's base/overlay pair. This does not write the inspector fields, so it does not survive a scene reload: the consuming app owns persisting the user's choice.
Exceptions
- ArgumentOutOfRangeException
Thrown when
maxDataBytesis zero or negative. It is not clamped, unlike the inspector field: a slider handing this a zero is a bug in the consuming app and a cache silently resized to one megabyte hides it.
SetProvider(TileProvider, string, string, bool?, bool?)
Switches the tile provider and rebuilds the tile pipeline; before Start only the serialized fields change.
public void SetProvider(TileProvider provider, string style = "", string apiKey = null, bool? retina512 = null, bool? labels = null)
Parameters
providerTileProviderTile source preset.
stylestringProvider style name; empty is the provider default.
apiKeystringAPI key; null leaves the current key unchanged.
retina512bool?512 px @2x tiles where the provider serves them; null leaves the current value.
labelsbool?Base-map labels on or off; null leaves the current value.
ShouldCatchUpLabelsAtRest(bool, bool)
True exactly once, the call after the view stops moving, so a caller whose throttle gate above otherwise never calls Rebuild again at rest still gets one settle-triggered call.
public static bool ShouldCatchUpLabelsAtRest(bool pendingRestSnap, bool viewMoved)
Parameters
pendingRestSnapboolTrue when the most recent Rebuild call ran with the view still moving, so its anchor is left sub-pixel.
viewMovedboolTrue when pan, zoom, rotate, or pitch changed since the last rebuild.
Returns
ShouldRebuildLabels(bool, bool, double, double, double)
True when a marker drag must rebuild now, or when the view moved and the 0.1 s throttle has elapsed.
public static bool ShouldRebuildLabels(bool needsRebuild, bool viewMoved, double now, double lastRebuild, double throttleSeconds = 0.1)
Parameters
needsRebuildboolTrue when a marker drag (or other label dirty) must bypass the throttle.
viewMovedboolTrue when pan, zoom, rotate, or pitch changed since the last rebuild.
nowdoubleCurrent time in seconds (realtimeSinceStartupAsDouble).
lastRebuilddoubleTime of the last rebuild, in the same seconds unit as
now.throttleSecondsdoubleThrottle window; defaults to LabelRebuildThrottleSeconds. A caller with its own cadence (e.g. PlaceLabelLayer) can pass its own window while sharing the same needsRebuild-bypasses-throttle semantics.
Returns
TryGetUrpTargetSize(Camera, out Vector2Int)
Gets the most recently reported URP render-target dimensions for a camera.
public static bool TryGetUrpTargetSize(Camera camera, out Vector2Int size)
Parameters
cameraCamerasizeVector2Int
Returns
UnregisterExternalOverlay(IMapScreenSpaceOverlay)
public override void UnregisterExternalOverlay(IMapScreenSpaceOverlay overlay)
Parameters
overlayIMapScreenSpaceOverlayOverlay to stop drawing.
ViewStateChanged(MapViewTransform, MapViewTransform)
True when center, zoom, bearing, pitch, altitude scale, or tile size differ; viewport size is not compared.
public static bool ViewStateChanged(MapViewTransform a, MapViewTransform b)
Parameters
aMapViewTransformFirst view.
bMapViewTransformSecond view.
Returns
WorstCaseFootprint(int, int)
Worst-case visible tile count for a screen of screenW x screenH under this map's settings at max pitch.
public int WorstCaseFootprint(int screenW, int screenH)
Parameters
Returns
Events
ViewChanged
public event Action<MapViewChange> ViewChanged