/////////////////////////////////////////// static void LoadLocation(int id) { if (locationId == id) { return; } locationId = id; // Reset data first, set terrain data values back to default! terrain.SetColormapData(Default.Tex, Vec2.Zero, Vec2.Zero); terrain.SetHeightmapData(Default.TexBlack, Vec3.Zero, Vec2.Zero); terrain.LocalPosition = Vec3.Zero; // Now request color and height data from the Bing Maps API, and when // it receives the results, store the values and setup the terrain! BingMaps.RequestColor(ApiKey, ImageryType.Aerial, locationQueries[id], (tex, size, center) => { mapColorSize = size; mapColorCenter = center; terrain.SetColormapData(tex, size.XZ * terrainScale, center * terrainScale); }).ConfigureAwait(false); BingMaps.RequestHeight(ApiKey, locationQueries[id], (tex, size, center) => { mapHeightSize = size; mapHeightCenter = center; terrain.SetHeightmapData(tex, size * terrainScale, center * terrainScale); }).ConfigureAwait(false); }
public DummyDataService(IServiceProvider services, BingMaps maps) { _Services = services; _Maps = maps; }