TheShopCritics2/TSC2.Server/Maps.cs

37 lines
1.1 KiB
C#

namespace TSC2.Server;
public class MapDriver
{
public static List<(double[], string)> InitializeMarkers(double[] inputCoords)
{
// Initialization
List<(double[], string)> results = [];
// Read list of addresses and names from DB and contact search API to get location
List<(double[] Coords, string Name)> db = new List<(double[], string)> ();
db.Add(([42.4649, -83.3684], "1"));
db.Add(([42.6649, -83.5684], "2"));
db.Add(([42.8649, -83.7684], "3"));
foreach (var entry in db)
{
(double[] Coords, string Name) info = ([], "");
// Read address and contact POI
info.Coords = entry.Coords; // TODO: replace with API lookup for the current entry's address
info.Name = entry.Name; // TODO: replace with name found in DB
results.Add(info);
}
return results;
}
public static double[] GetCoordinates(string shopName, string CSZ)
{
// Use information provided to search for the place using an api
// Parse the result and return coords
return [];
}
}