public async Task <IEnumerable <string> > Get() { // var client = new LadClient("https://lad.lviv.ua/api", new JsonSerializer()); // var response = await client.GetAllRoutes(); var mapsClient = new MapsClient("https://maps.googleapis.com/maps/api/", new JsonSerializer(), "AIzaSyCX780yRIpZYmbfQaE4imqJZQ9rCyar5mw"); var response = await mapsClient.GetDirectionsBeetweenTwoPoints(new Location(49.842694, 24.001365), new Location(49.841601, 24.015784)); return(new string[] { "value1", "value2" }); }
private void SelectNewLocation(Vector2 position) { string bounds = string.Format("{0},{1},{2},{3}", position.x - boundingBoxOffset, position.y - boundingBoxOffset, position.x + boundingBoxOffset, position.y + boundingBoxOffset); ImgResource = new WWW(MapsClient.GetStaticImageUri(bounds, 512, 512)); elevationData = new float[rowsAndCols, rowsAndCols]; ElevationResource = new WWW(MapsClient.GetElevationsUri(bounds, rowsAndCols, rowsAndCols)); imgSet = false; elevSet = false; }
public static void Initialize(TestContext context) { _apiKey = "AvJQsrmfwSe4_eSLugsqhHL9F7NdEAyEm8J7Vi4FSYbcdVGAk0T9kM3UtyElbcLf"; _client = new MapsClient(_apiKey); }