Beispiel #1
0
    private async void search(string query)
    {
        var request = new PlacesTextSearchRequest
        {
            Key   = _secretsService.GoogleApiKey,
            Query = query,
        };

        var response = await GooglePlaces.TextSearch.QueryAsync(request);

        foreach (var result in response.Results)
        {
            var location = result.Geometry.Location;
            viewportService.SetCenter(location.Latitude, location.Longitude);
            break;
        }
    }
Beispiel #2
0
    public void OnPointerClick(PointerEventData eventData)
    {
        var location = CafeMap.Player.LocationService.getLocation();

        _viewportService.SetCenter(location.Lat, location.Lng);
    }