public async Task MapDoubleClicked(GeolocationCoordinate geolocationCoordinate) { if (_mapDoubleClickedCallback is not null) { await _mapDoubleClickedCallback.Invoke(geolocationCoordinate); } }
public async Task MapMouseDown(GeolocationCoordinate geolocationCoordinate) { if (_mapMouseDownCallback is not null) { await _mapMouseDownCallback.Invoke(geolocationCoordinate); } }
public async Task MarkerDragStart(string id, GeolocationCoordinate geolocation) { if (_markers.ContainsKey(id)) { var callback = _markers[id].OnDragStartCallback; await CustomEvent(callback, id, geolocation); } }
public void GeolocationCoordinate_should_handle_nulls() { var coord = new GeolocationCoordinate(null, null); var coord2 = new GeolocationCoordinate(0.0, null); var coord3 = new GeolocationCoordinate(null, 0.0); Assert.AreEqual(false, coord.HasCoordinates); Assert.AreEqual(false, coord2.HasCoordinates); Assert.AreEqual(false, coord3.HasCoordinates); }
public void GeolocationCoordinate_should_return_correct_String_format() { var coord = new GeolocationCoordinate(null, null); var coord2 = new GeolocationCoordinate(0.0, null); var coord3 = new GeolocationCoordinate(null, 0.0); var coord4 = new GeolocationCoordinate(1.0123456789, 2.0123456789); Assert.AreEqual("", coord.ToString()); Assert.AreEqual("", coord2.ToString()); Assert.AreEqual("", coord3.ToString()); Assert.AreEqual("1.0123456789,2.0123456789", coord4.ToString()); }
/// <summary> /// Default constructor. /// </summary> /// <param name="position">Marker position on the Map</param> public GoogleMapMarker(GeolocationCoordinate position) : base(position) { }
private async Task CustomEvent(Func <string, GeolocationCoordinate, Task>?callback, string id, GeolocationCoordinate geolocation) { if (callback is not null) { await callback.Invoke(id, geolocation); } }