You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mapbox-sdk/MapBox Extension/VirgisAbstractMap.cs

23 lines
1.0 KiB

5 months ago
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);
}
}
}