Skip to content

Commit ce9e63f

Browse files
committed
Note lat lon are doubles, not floats.
1 parent 8caf724 commit ce9e63f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/INonAuthClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public interface INonAuthClient
4949
Task<Note[]> GetNotes(Bounds bounds, int limit = 100, int maxClosedDays = 7);
5050
Task<Stream> GetNotesRssFeed(Bounds bounds);
5151
Task<Note[]> QueryNotes(string searchText, long? userId, string userName, int? limit, int? maxClosedDays, DateTime? fromDate, DateTime? toDate);
52-
Task<Note> CreateNote(float latitude, float longitude, string text);
52+
Task<Note> CreateNote(double latitude, double longitude, string text);
5353
}
5454
}

src/NonAuthClient.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ private static string FormatNoteDate(DateTime date)
644644
/// <see href="https://wiki.openstreetmap.org/wiki/API_v0.6#Create_a_new_note:_Create:_POST_.2Fapi.2F0.6.2Fnotes">
645645
/// POST /api/0.6/notes</see>.
646646
/// </summary>
647-
public async Task<Note> CreateNote(float latitude, float longitude, string text)
647+
public async Task<Note> CreateNote(double latitude, double longitude, string text)
648648
{
649649
var query = HttpUtility.ParseQueryString(string.Empty);
650650
query["text"] = text;
@@ -685,6 +685,11 @@ protected string ToString(float number)
685685
return number.ToString(OsmMaxPrecision);
686686
}
687687

688+
protected string ToString(double number)
689+
{
690+
return number.ToString(OsmMaxPrecision);
691+
}
692+
688693
#region Http
689694
protected static readonly Func<string, string> Encode = HttpUtility.UrlEncode;
690695

0 commit comments

Comments
 (0)