/// <summary> /// Parses data provided with the last geocoding request. /// </summary> public void ParseLastGeocodeResponse() { double latitudeSum = 0; double longitudeSum = 0; int count = _latestGeocodeResponse.Count(); if (count == 0) { return; } foreach (var result in _latestGeocodeResponse) { CoordinatesReceived?.Invoke(this, new GeocodingCoordinatesArgs(result.Latitude, result.Longitude)); latitudeSum += result.Latitude; longitudeSum += result.Longitude; } CenterPointCalculated?.Invoke(this, new GeocodingCoordinatesArgs(latitudeSum / count, longitudeSum / count)); }
public SignalRChatService(HubConnection connection) { _connection = connection; _connection.On <BoardCoordinates>("ReceivedCoordinatesMessage", (coordinates) => CoordinatesReceived?.Invoke(coordinates)); }