Files
mapbox-sdk/MapBox Extension/VirgisAbstractMap.cs
T
2024-05-13 14:06:14 +01:00

23 lines
1.0 KiB
C#

using UnityEngine;
using Mapbox.Unity.Map;
namespace Virgis {
public class VirgisAbstractMap : AbstractMap {
public Material tileMaterial;
public void SetProperties(ImagerySourceType imageSource, ElevationLayerType elevationLayerType, ElevationSourceType elevationSource, int size = 1) {
_imagery.SetProperties(imageSource, false, false, false);
_terrain.SetProperties(elevationSource, elevationLayerType);
MapOptions mapOptions = Options;
MapExtentOptions extentOptions = mapOptions.extentOptions;
extentOptions.extentType = MapExtentType.RangeAroundCenter;
extentOptions.defaultExtents.rangeAroundCenterOptions.east = size;
extentOptions.defaultExtents.rangeAroundCenterOptions.west = size;
extentOptions.defaultExtents.rangeAroundCenterOptions.north = size;
extentOptions.defaultExtents.rangeAroundCenterOptions.south = size;
SetTileMaterial(tileMaterial);
}
}
}