RegionRepositoryV4.GetMapImage Method

Retrieves the map image for a specific region.

Namespace: Gamanet.C4.SDK
Assembly: Gamanet.C4.SimpleClient (in Gamanet.C4.SimpleClient.dll) Version: 2026.0.0.733
Syntax
C#
public Stream GetMapImage(
	Guid regionId
)

Parameters

regionId  Guid
The ID of the region.

Return Value

Stream
A stream containing the map image data.

Implements

ISimpleClientRegionRepositoryV4.GetMapImage(Guid)
Example
The following example illustrates how to delete a map image for region
C#
using System;
using Gamanet.C4.SDK;
using Gamanet.C4.SimpleInterfaces;

public class Example
{
    static void Main()
    {
        // Create instance of simple client
        var client = new SimpleClient(ConnectorConfiguration.HttpClient);

        ConnectionInfoV1 token;
        // Connect to local server
        var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token);

        if (connectionResult != ConnectionResult.Successful)
        {
            Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult);
            return;
        }

        Console.WriteLine("Connection result: {0}", connectionResult);
        Console.WriteLine();

        // Create the Example Region
        var exampleRegion = new SimpleRegionV1(
        Guid.NewGuid(),
        "ExampleRegion",
        EntityRoot.Region,
        RegionCategory.Region
        );

        // Create region in db
        client.Regions.Create(exampleRegion);

        // Create map image for Example Region
        client.Regions.CreateOrUpdateMapImage(exampleRegion.Id, mapImage);

        // Get map image for Example Region
        var result = client.Regions.GetMapImage(exampleRegion.Id);

        // Disconnect from server
        client.Disconnect();
    }
}
See Also

Reference

RegionRepositoryV4 Class
Gamanet.C4.SDK Namespace