Skip to content

Commit 3de8e50

Browse files
author
Dogukan Erenel
committed
* Minor addition to Alchemy API to get location info (no dependency with XRAY)
1 parent a16dd1e commit 3de8e50

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

Scripts/Services/AlchemyAPI/DataModels.cs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using FullSerializer;
1919
using System.Text;
2020
using System.Collections.Generic;
21-
using IBM.Watson.DeveloperCloud.Services.XRAY.v1;
2221

2322
namespace IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1
2423
{
@@ -106,6 +105,35 @@ public override string ToString()
106105

107106
};
108107

108+
public class PositionOnMap
109+
{
110+
public string PositionName;
111+
public double Latitude; //Y : North - south
112+
public double Longitude; //X : West - East
113+
114+
public double X { get { return Longitude; } }
115+
public double Y { get { return Latitude; } }
116+
117+
public PositionOnMap(double latitude, double longitude)
118+
{
119+
this.Latitude = latitude;
120+
this.Longitude = longitude;
121+
}
122+
123+
public PositionOnMap(double latitude, double longitude, string positionName)
124+
{
125+
this.Latitude = latitude;
126+
this.Longitude = longitude;
127+
this.PositionName = positionName;
128+
}
129+
130+
public override string ToString()
131+
{
132+
return string.Format("[PositionOnMap: Name: {0}, Latitude:{1}, Longitude:{2}]", PositionName, Latitude.ToString(), Longitude.ToString());
133+
}
134+
}
135+
136+
109137
public enum EntityPrimaryType
110138
{
111139
NONE = -1,

0 commit comments

Comments
 (0)