Table of Contents

Class ServerMap

Namespace
RustPlusApi.Data
Assembly
RustPlusApi.dll

Server map image and monument list returned by GetMapAsync.

public sealed record ServerMap : IEquatable<ServerMap>
Inheritance
ServerMap
Implements
Inherited Members

Remarks

Width, Height and OceanMargin are pixel measurements of JpgImage — only marker/monument coordinates and ServerInfo.MapSize are world units. The canonical world→pixel transform (world origin bottom-left, image origin top-left — hence the Y flip):

px = worldX * ((Width  - 2 * OceanMargin) / ServerInfo.MapSize) + OceanMargin
py = Height - (worldY * ((Height - 2 * OceanMargin) / ServerInfo.MapSize) + OceanMargin)

Properties

Background

Background colour of the map (ocean colour).

public Color Background { get; init; }

Property Value

Color

Height

Height of JpgImage in pixels.

public uint? Height { get; init; }

Property Value

uint?

JpgImage

Raw JPEG image bytes of the map tile, if available.

public byte[]? JpgImage { get; init; }

Property Value

byte[]

Monuments

List of monuments present on the map.

public List<ServerMapMonument>? Monuments { get; init; }

Property Value

List<ServerMapMonument>

OceanMargin

Width of the ocean border baked into JpgImage, in pixels.

public int? OceanMargin { get; init; }

Property Value

int?

Width

Width of JpgImage in pixels.

public uint? Width { get; init; }

Property Value

uint?