//---------------------------------------------------------------- // Set a path point //---------------------------------------------------------------- public void setPathPoint(double lat, double lng, string groupName) { treasureWS.TreasureWS treasure = new treasureWS.TreasureWS(); treasureWS.Point point = new treasureWS.Point(); point.Lat = lat; point.Lng = lng; treasure.setPathPoint(point, groupName); }
//-------------------------------------------------------------------------- // Get the distance of the point for a specific group from the target point //-------------------------------------------------------------------------- public string getDistance(double lat, double lng, string groupName) { try { treasureWS.TreasureWS treasure = new treasureWS.TreasureWS(); treasureWS.Point point = new treasureWS.Point(); point.Lat = lat; point.Lng = lng; double dist = treasure.getDistance(point, groupName); treasure.setPathPoint(point, groupName); JavaScriptSerializer js = new JavaScriptSerializer(); string jsonString = js.Serialize(dist); return(jsonString); } catch (Exception ex) { throw ex; } }